Elgg  Version 3.0
admin_exception.php
Go to the documentation of this file.
1 <?php
13 
14 if (!$exception instanceof Throwable) {
15  return;
16 }
17 
18 $result = new stdClass();
19 $result->error = get_class($exception);
20 $result->ts = (int) elgg_extract('ts', $vars);
21 $result->message = $exception->getMessage();
22 
23 if ($exception instanceof DatabaseException) {
24  $result->query = $exception->getQuery();
25  $result->params = $exception->getParameters();
26 } else {
27  $result->trace = $exception->getTrace();
28 }
29 
30 echo json_encode($result);
if(!$exception instanceof Throwable) $result
$exception
elgg echo
Translates a string.
Definition: languages.js:43
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
$vars['type']
Definition: save.php:11