Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 5
TimeoutException
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 5
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 getLimit
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
<?php
namespace Wikimedia\RequestTimeout;
/**
 * The base class for timeout exceptions thrown by this library
 */
class TimeoutException extends \Exception {
    /** @var float */
    private $limit;
    public function __construct( $message, $limit ) {
        parent::__construct( $message );
        $this->limit = $limit;
    }
    /**
     * Get the limit which was exceeded, in seconds.
     *
     * @return float
     */
    public function getLimit() {
        return $this->limit;
    }
}