/** * This function returns a string for this object. * * @access public * @override * @uses Throwable\Runtime\Exception::text * @return string the string for this object */ public function __toString() { return Throwable\Runtime\Exception::text($this); }
/** * This constructor creates a new runtime exception. * * throw new Throwable\Runtime\Exception('Unable to find :uri', array(':uri' => $uri)); * * @access public * @param string $message the error message * @param array $variables the translation variables * @param integer $code the exception code */ public function __construct($message = '', array $variables = null, $code = 0) { parent::__construct(empty($variables) ? (string) $message : strtr((string) $message, $variables), (int) $code); $this->code = (int) $code; // Known bug: http://bugs.php.net/39615 }