Ejemplo n.º 1
0
 public function __construct($status_code, $viewName = 'errors/http')
 {
     if (isset(static::$messages[$status_code])) {
         parent::__construct(static::$messages[$status_code]);
     } else {
         parent::__construct('Uncaught exception');
     }
     http_response_code($status_code);
     $message = static::$messages[$status_code];
     echo View::build($viewName, compact('status_code', 'message'));
 }
Ejemplo n.º 2
0
 /**
  *This constructor method sets the default values of this class properties
  *
  *@param Object \Registry class This loads the user configuration array
  *@return \BaseExceptionClass object instance
  */
 public function __construct($errorMessage = null, $errorCode = 0, Exception $previous = null)
 {
     //enable parent constructor
     parent::__construct($errorMessage, $errorCode, $previous);
     //set the value of siteTile property
     $this->siteTile = Registry::getConfig()['title'];
     //set the default error log file path
     $this->errorLogFilePath = Registry::getConfig()['root'] . '/' . Registry::getConfig()['error_log_file_path'];
     //set the value  of the development environment, as defined in the user configuration
     $this->devENV = Registry::getConfig()['dev'];
     //set the path to the error page html
     $this->ErrorPageHtml = Registry::getConfig()['root'] . "/system/Exceptions/ErrorPageHtml.php";
 }
Ejemplo n.º 3
0
 public function __construct($message)
 {
     parent::__construct($message);
 }