You are here

function _logs_http_decode_exception in Logs HTTP 7

Decodes an exception and retrieves the correct caller.

Parameters

$exception: The exception object that was thrown.

Return value

array An error in the format expected by _drupal_log_error().

See also

_drupal_decode_exception()

1 call to _logs_http_decode_exception()
_logs_http_exception_handler in ./logs_http.module
Provides custom PHP exception handling.

File

./logs_http.module, line 79
Logs HTTP module.

Code

function _logs_http_decode_exception($exception) {
  $return = _drupal_decode_exception($exception);

  // We have to serialize and encode the array here to prevent a notice in
  // theme_dblog_message(). We will decode the string back in
  // logs_http_watchdog()
  $return['exception_trace'] = drupal_base64_encode(serialize($exception
    ->getTrace()));
  return $return;
}