Esempio n. 1
0
 public function _error(\Exception $e)
 {
     $msg = sprintf('<h1>500 Internal Server Error</h1>' . '<h3>%s (%s)</h3>' . '<pre>%s</pre>', $e->getMessage(), $e->getCode(), $e->getTraceAsString());
     try {
         $this->response(false)->status(500)->write($msg)->send();
     } catch (\Exception $ex) {
         exit($msg);
     }
 }
Esempio n. 2
0
 protected function Exception__2($message, Exception $innerException = null)
 {
     parent::__construct((string) $message, 0, $innerException);
 }
 /**
  * Initializes a new instance of that class.
  *
  * @param string $path The path of the directory.
  * @param string $message The message.
  * @param \Exception $innerException The inner exception.
  * @param int $code The code.
  */
 public function __construct($path = null, $message = null, \Exception $innerException = null, int $code = 0)
 {
     $this->_path = ClrString::valueToString($path, false);
     parent::__construct($message, $innerException, $code);
 }
Esempio n. 4
0
 /**
  * Initializes a new instance of that class.
  *
  * @param IEnumerable $seq The underlying sequence.
  * @param string $message The message.
  * @param \Exception $innerException The inner exception.
  * @param int $code The code.
  */
 public function __construct(IEnumerable $seq, $message = null, \Exception $innerException = null, int $code = 0)
 {
     $this->_sequence = $seq;
     parent::__construct($message, $innerException, $code);
 }