LimeSurvey API - Master branch

AppErrorHandler
in package

Application error handling logic

Table of Contents

Methods

onError()  : void
onException()  : void
ajaxErrorResponse()  : void
Outputs an exception as JSON.
handleRestError()  : mixed
Handles PHP execution errors such as warnings, notices.
handleRestException()  : void
Handles uncaught PHP exceptions.
handleWebException()  : void
Handle web exception
handleWebFriendlyException()  : void
Handles "friendly" exceptions by setting a flash message and redirecting.
restErrorResponse()  : mixed
JSON error response.

Methods

ajaxErrorResponse()

Outputs an exception as JSON.

private ajaxErrorResponse(CHttpException $exception) : void
Parameters
$exception : CHttpException

handleRestError()

Handles PHP execution errors such as warnings, notices.

private handleRestError(mixed $event) : mixed
Parameters
$event : mixed

handleRestException()

Handles uncaught PHP exceptions.

private handleRestException(CExceptionEvent $event) : void
Parameters
$event : CExceptionEvent

handleWebException()

Handle web exception

private handleWebException(CExceptionEvent $event) : void
Parameters
$event : CExceptionEvent

handleWebFriendlyException()

Handles "friendly" exceptions by setting a flash message and redirecting.

private handleWebFriendlyException(LSUserException $exception) : void

If the exception doesn't specify a redirect URL, the referrer is used.

Parameters
$exception : LSUserException

restErrorResponse()

JSON error response.

private restErrorResponse(int $code, string $message, string $file, int $line) : mixed
Parameters
$code : int

the level of the error raised

$message : string

the error message

$file : string

the filename that the error was raised in

$line : int

the line number the error was raised at


        
On this page

Search results