Пример #1
0
 /**
  * Construct a new overflow exception.
  *
  * @param int the value that is out of range.
  *
  * @param int the minimum allowed value.
  *
  * @param int the maximum allowed value.
  */
 function __construct($v, $min, $max)
 {
     parent::__construct('Value %.0f out of range [%.0f, %.0f]', $v, $min, $max);
 }
Пример #2
0
 /**
  * Construct a new invalid marker exception.
  *
  * The exception will contain a message describing the error,
  * including the byte found and the offset of the offending byte.
  *
  * @param int the byte found.
  *
  * @param int the offset in the data.
  */
 function __construct($marker, $offset)
 {
     parent::__construct('Invalid marker found at offset %d: 0x%2X', $offset, $marker);
 }