Exemplo n.º 1
0
 /**
  * Create a new PHP error exception.
  *
  * @return  void
  */
 public function __construct($code, $error, $file, $line, $context = NULL)
 {
     parent::__construct($error);
     // Set the error code, file, line, and context manually
     $this->code = $code;
     $this->file = $file;
     $this->line = $line;
 }
Exemplo n.º 2
0
 /**
  * Set internal properties.
  *
  * @param  string  URI of page
  * @param  string  custom error template
  */
 public function __construct($page = NULL)
 {
     if ($page === NULL) {
         // Use the complete URI
         $page = Router::$complete_uri;
     }
     parent::__construct(strtr('The page you requested, %page%, could not be found.', array('%page%' => $page)));
 }
Exemplo n.º 3
0
 /**
  * Sets exception message and debug info.
  *
  * @param   string  message
  * @param   mixed   debug info
  * @return  void
  */
 public function __construct($message, $debug = nil)
 {
     // Failure message
     parent::__construct("UnitTest Exception", (string) $message);
     // Extra user-defined debug info
     $this->debug = $debug;
     // Overwrite failure location
     $trace = $this->getTrace();
     $this->file = $trace[0]['file'];
     $this->line = $trace[0]['line'];
 }
Exemplo n.º 4
0
 /**
  * Set exception title and message.
  *
  * @param   string  exception title string
  * @param   string  exception message string
  * @param   string  custom error template
  */
 public function __construct($title, $message, array $variables = NULL)
 {
     parent::__construct($message, $variables);
     // Code is the error title
     $this->code = $title;
 }
Exemplo n.º 5
0
 public function __construct($message, $variables = NULL, $code = 0)
 {
     parent::__construct($message, $variables, $code);
 }