public function __construct($message, $code = 0, Exception $cause = null) { assert('is_string($message)'); assert('is_int($code)'); parent::__construct($message, $code); $this->initBacktrace($this); if ($cause !== null) { $this->cause = SimpleSAML_Error_Exception::fromException($cause); } }
/** * Constructor for the assertion exception. * * Should only be called from the onAssertion handler. * * @param string|NULL $assertion The assertion which failed, or NULL if the assert-function was * given an expression. */ public function __construct($assertion = NULL) { assert('is_null($assertion) || is_string($assertion)'); $msg = 'Assertion failed: ' . var_export($assertion, TRUE); parent::__construct($msg); $this->assertion = $assertion; }