public static function _handler(Exception $e) { try { JsonApiApplication_Exception::log($e); $response = JsonApiApplication_Exception::response($e); return $response; } catch (Exception $e) { ob_get_level() and ob_clean(); header("Content-Type: text/plain; charset=" . JsonApiApplication::$charset, TRUE, 500); echo JsonApiApplication_Exception::text($e); exit(1); } }
public function get_response() { return JsonApiApplication_Exception::response($this); }