admin_exception.php 318 B

1234567891011121314151617
  1. <?php
  2. /**
  3. * Elgg JSON exception
  4. * Displays a single exception
  5. *
  6. * @package Elgg
  7. * @subpackage Core
  8. *
  9. * @uses $vars['object'] An exception
  10. */
  11. $exception = $vars['object'];
  12. $result = new stdClass();
  13. $result->error = get_class($exception);
  14. $result->message = $exception->getMessage();
  15. echo json_encode($result);