projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-15180 - https://issues.civicrm.org/jira/browse/CRM-15180
[civicrm-core.git]
/
CRM
/
Core
/
Error.php
diff --git
a/CRM/Core/Error.php
b/CRM/Core/Error.php
index a5e14815330240b12a24f801b577d55d0d1e0906..688299a140dc494896c7b54a8afa9be467a65bd2 100644
(file)
--- a/
CRM/Core/Error.php
+++ b/
CRM/Core/Error.php
@@
-73,7
+73,7
@@
class CRM_Exception extends PEAR_Exception {
class CRM_Core_Error extends PEAR_ErrorStack {
/**
class CRM_Core_Error extends PEAR_ErrorStack {
/**
- *
s
tatus code of various types of errors
+ *
S
tatus code of various types of errors
* @var const
*/
CONST FATAL_ERROR = 2;
* @var const
*/
CONST FATAL_ERROR = 2;
@@
-103,7
+103,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
public static $modeException = NULL;
/**
public static $modeException = NULL;
/**
- *
s
ingleton function used to manage this object.
+ *
S
ingleton function used to manage this object.
*
* @param null $package
* @param bool $msgCallback
*
* @param null $package
* @param bool $msgCallback
@@
-122,7
+122,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
/**
}
/**
- *
c
onstructor
+ *
C
onstructor
*/
function __construct() {
parent::__construct('CiviCRM');
*/
function __construct() {
parent::__construct('CiviCRM');
@@
-168,7
+168,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
/**
}
/**
- *
c
reate the main callback method. this method centralizes error processing.
+ *
C
reate the main callback method. this method centralizes error processing.
*
* the errors we expect are from the pear modules DB, DB_DataObject
* which currently use PEAR::raiseError to notify of error messages.
*
* the errors we expect are from the pear modules DB, DB_DataObject
* which currently use PEAR::raiseError to notify of error messages.
@@
-298,7
+298,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
/**
}
/**
- *
d
isplay an error page with an error message describing what happened
+ *
D
isplay an error page with an error message describing what happened
*
* @param string $message the error message
* @param string $code the error code if any
*
* @param string $message the error message
* @param string $code the error code if any
@@
-355,6
+355,13
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
}
}
}
+ if ($config->backtrace) {
+ self::backtrace();
+ }
+
+ CRM_Core_Error::debug_var('Fatal Error Details', $vars);
+ CRM_Core_Error::backtrace('backTrace', TRUE);
+
// If we are in an ajax callback, format output appropriately
if (CRM_Utils_Array::value('snippet', $_REQUEST) === CRM_Core_Smarty::PRINT_JSON) {
$out = array(
// If we are in an ajax callback, format output appropriately
if (CRM_Utils_Array::value('snippet', $_REQUEST) === CRM_Core_Smarty::PRINT_JSON) {
$out = array(
@@
-370,22
+377,16
@@
class CRM_Core_Error extends PEAR_ErrorStack {
CRM_Core_Page_AJAX::returnJsonResponse($out);
}
CRM_Core_Page_AJAX::returnJsonResponse($out);
}
- if ($config->backtrace) {
- self::backtrace();
- }
-
$template = CRM_Core_Smarty::singleton();
$template->assign($vars);
$template = CRM_Core_Smarty::singleton();
$template->assign($vars);
- CRM_Core_Error::debug_var('Fatal Error Details', $vars);
- CRM_Core_Error::backtrace('backTrace', TRUE);
$config->userSystem->outputError($template->fetch($config->fatalErrorTemplate));
self::abend(CRM_Core_Error::FATAL_ERROR);
}
/**
$config->userSystem->outputError($template->fetch($config->fatalErrorTemplate));
self::abend(CRM_Core_Error::FATAL_ERROR);
}
/**
- *
d
isplay an error page with an error message describing what happened
+ *
D
isplay an error page with an error message describing what happened
*
* This function is evil -- it largely replicates fatal(). Hopefully the
* entire CRM_Core_Error system can be hollowed out and replaced with
*
* This function is evil -- it largely replicates fatal(). Hopefully the
* entire CRM_Core_Error system can be hollowed out and replaced with
@@
-458,7
+459,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
/**
}
/**
- *
o
utputs pre-formatted debug information. Flushes the buffers
+ *
O
utputs pre-formatted debug information. Flushes the buffers
* so we can interrupt a potential POST/redirect
*
* @param string name of debug section
* so we can interrupt a potential POST/redirect
*
* @param string name of debug section
@@
-557,7
+558,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
/**
}
/**
- *
d
isplay the error message on terminal
+ *
D
isplay the error message on terminal
*
* @param $message
* @param bool $out should we log or return the output
*
* @param $message
* @param bool $out should we log or return the output
@@
-798,7
+799,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
* @param $message
* @param int $code
* @param string $level
* @param $message
* @param int $code
* @param string $level
- * @param
null
$params
+ * @param
array
$params
*
* @return object
*/
*
* @return object
*/
@@
-835,7
+836,7
@@
class CRM_Core_Error extends PEAR_ErrorStack {
}
/**
}
/**
- *
r
eset the error stack
+ *
R
eset the error stack
*
* @access public
* @static
*
* @access public
* @static