From 52e9cd376e8f6d9a34750a3adc990f066fe4f4c3 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 16 Jul 2009 09:43:14 +0000 Subject: [PATCH] Error_Assertion: Change to internal error. Change the SimpleSAML_Error_Assertion class to inherit from SimpleSAML_Error_Exception, to signal it being an internal error. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1588 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Error/Assertion.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/SimpleSAML/Error/Assertion.php b/lib/SimpleSAML/Error/Assertion.php index 67132d826..67b27d13f 100644 --- a/lib/SimpleSAML/Error/Assertion.php +++ b/lib/SimpleSAML/Error/Assertion.php @@ -7,7 +7,7 @@ * @package simpleSAMLphp * @version $Id$ */ -class SimpleSAML_Error_Assertion extends SimpleSAML_Error_Error { +class SimpleSAML_Error_Assertion extends SimpleSAML_Error_Exception { /** @@ -28,7 +28,8 @@ class SimpleSAML_Error_Assertion extends SimpleSAML_Error_Error { public function __construct($assertion = NULL) { assert('is_null($assertion) || is_string($assertion)'); - parent::__construct(array('ASSERTFAIL', '%ASSERTION%' => var_export($assertion, TRUE))); + $msg = 'Assertion failed: ' . var_export($assertion, TRUE); + parent::__construct($msg); $this->assertion = $assertion; } -- GitLab