if (php_sapi_name() == "cli") {
print ("Sorry. A non-recoverable error has occurred.\n$message \n$code\n$email\n\n");
- debug_print_backtrace();
+ // Fix for CRM-16899
+ echo static::formatBacktrace(debug_backtrace());
die("\n");
// FIXME: Why doesn't this call abend()?
// Difference: abend() will cleanup transaction and (via civiExit) store session state