class AjaxException extends BaseException

Properties

protected Exception $mask from  BaseException
string $hint from  BaseException
protected array $fileContent from  BaseException
protected string $className from  BaseException
protected string $errorType from  BaseException
protected stdClass $highlight from  BaseException
protected array $contents

Methods

__construct($contents)

Constructor.

string
getClassName()

Returns the class name of the called Exception.

string
getErrorType()

Returns the error type derived from the error code used.

static void
mask(string $message = null, int $code = 0)

Masks an exception with the called class. This should catch fatal and php errors.

static void
unmask()

Removes the active mask from the called class.

void
setMask(Exception $exception)

If this exception acts as a mask, sets the face for the foreign exception.

void
applyMask(Exception $exception)

This method is used when applying the mask exception to the face exception.

getTrueException()

If this exception is acting as a mask, return the face exception. Otherwise return this exception as the true one.

array
getHighlight()

Generates information used for highlighting the area of code in context of the exception line number.

array
getHighlightLines()

Returns an array of line numbers used for highlighting the problem area of code.

array
getCallStack()

Returns the call stack as an array of values containing a stack information object.

array
filterCallStack(array $traceInfo)

Removes the final steps of a call stack, which add no value for the user.

string
formatStackArguments(array $arguments)

Prepares a function or method argument list for display in HTML or text format

getContents()

Returns invalid fields.

Details

at line 16
__construct($contents)

Constructor.

Parameters

$contents

in BaseException at line 70
string getClassName()

Returns the class name of the called Exception.

Return Value

string

in BaseException at line 79
string getErrorType()

Returns the error type derived from the error code used.

Return Value

string

in BaseException at line 91
static void mask(string $message = null, int $code = 0)

Masks an exception with the called class. This should catch fatal and php errors.

It should always be followed by the unmask() method to remove the mask.

Parameters

string $message

Error message.

int $code

Error code.

Return Value

void

in BaseException at line 102
static void unmask()

Removes the active mask from the called class.

Return Value

void

in BaseException at line 112
void setMask(Exception $exception)

If this exception acts as a mask, sets the face for the foreign exception.

Parameters

Exception $exception

Face for the mask, the underlying exception.

Return Value

void

in BaseException at line 124
void applyMask(Exception $exception)

This method is used when applying the mask exception to the face exception.

It can be used as an override for child classes who may use different masking logic.

Parameters

Exception $exception

Face exception being masked.

Return Value

void

in BaseException at line 137
Exception getTrueException()

If this exception is acting as a mask, return the face exception. Otherwise return this exception as the true one.

Return Value

Exception

The underlying exception, or this exception if no mask is applied.

in BaseException at line 155
array getHighlight()

Generates information used for highlighting the area of code in context of the exception line number.

The highlighted block of code will be six (6) lines before and after the problem line number.

Return Value

array

Highlight information as an array, the following keys are supplied: startLine - The starting line number, 6 lines before the error line. endLine - The ending line number, 6 lines after the error line. errorLine - The focused error line number. lines - An array of all the lines to be highlighted, each value is a line of code.

in BaseException at line 199
array getHighlightLines()

Returns an array of line numbers used for highlighting the problem area of code.

This will be six (6) lines before and after the error line number.

Return Value

array

Array of code lines.

in BaseException at line 218
array getCallStack()

Returns the call stack as an array of values containing a stack information object.

Return Value

array

with stack information, each value will be an object with these values: id - The stack ID number. code - The class and function name being called. args - The arguments passed to the code function above. file - Reference to the file containing the called code. line - Reference to the line number of the file.

in BaseException at line 261
protected array filterCallStack(array $traceInfo)

Removes the final steps of a call stack, which add no value for the user.

The following exceptions and any trace information afterwards will be filtered:

  • Illuminate\Foundation\Bootstrap\HandleExceptions

Parameters

array $traceInfo

The trace information from getTrace() or debug_backtrace().

Return Value

array

The filtered array containing the trace information.

in BaseException at line 311
protected string formatStackArguments(array $arguments)

Prepares a function or method argument list for display in HTML or text format

Parameters

array $arguments

A list of the function or method arguments

Return Value

string

at line 30
getContents()

Returns invalid fields.