exception.php 273 B

12345678910111213141516
  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. echo json_encode($result);