Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
EmergencyTimeoutException
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Wikimedia\RequestTimeout;
4
5/**
6 * An exception which is thrown if a critical section is open for too long.
7 */
8class EmergencyTimeoutException extends TimeoutException {
9    /**
10     * @param string $name The name of the critical section
11     * @param float $limit The limit (in seconds) which has expired
12     */
13    public function __construct( $name, $limit ) {
14        parent::__construct( "The critical section \"$name\" timed out after {limit} seconds",
15            $limit );
16    }
17}