core\Error::__construct PHP Method

__construct() public method

Create a Exception
public __construct ( string $message = 'Internal Server Error', integer $code, Throwable $previous = null, array $trace = [] )
$message string Error message
$code integer Error code
$previous Throwable Previous exception
$trace array Backtrace information
    public function __construct($message = 'Internal Server Error', $code = 0, $previous = null, $trace = array())
    {
        parent::__construct($message, $code, $previous);
        $this->trace = $trace;
        if (!$trace) {
            $this->trace = debug_backtrace();
        }
    }

Usage Example

コード例 #1
0
ファイル: exceptions.php プロジェクト: radiosilence/core
 public function __construct($message)
 {
     parent::__construct(sprintf("Session error [Local]: %s", $message));
 }
All Usage Examples Of core\Error::__construct