/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
require_once 'PEAR/ErrorStack.php';
require_once 'PEAR/Exception.php';
+require_once 'CRM/Core/Exception.php';
require_once 'Log.php';
class CRM_Exception extends PEAR_Exception {
echo "Sorry. A non-recoverable error has occurred. The error trace below might help to resolve the issue<p>";
CRM_Core_Error::debug(NULL, $error);
}
-
+ static $runOnce = FALSE;
+ if ($runOnce) {
+ exit;
+ }
+ $runOnce = TRUE;
self::abend(1);
}
* @access public
* @static
*/
- public static function statusBounce($status, $redirect = NULL) {
+ public static function statusBounce($status, $redirect = NULL, $title = '') {
$session = CRM_Core_Session::singleton();
if (!$redirect) {
$redirect = $session->readUserContext();
}
- $session->setStatus($status);
+ $session->setStatus($status, $title);
CRM_Utils_System::redirect($redirect);
}