BaseException
class BaseException extends Exception
The base exception class.
This class represents a base interface and set of properties for system and application exceptions.
Properties
protected Exception | $mask | ||
string | $hint | ||
protected array | $fileContent | ||
protected string | $className | ||
protected string | $errorType | ||
protected stdClass | $highlight |
Methods
CMS base exception class constructor. Inherits the native PHP Exception.
Returns the class name of the called Exception.
Returns the error type derived from the error code used.
Masks an exception with the called class. This should catch fatal and php errors.
Removes the active mask from the called class.
If this exception is acting as a mask, return the face exception. Otherwise return this exception as the true one.
Generates information used for highlighting the area of code in context of the exception line number.
Returns an array of line numbers used for highlighting the problem area of code.
Returns the call stack as an array of values containing a stack information object.
Removes the final steps of a call stack, which add no value for the user.
Prepares a function or method argument list for display in HTML or text format
Details
at line 53
__construct(string $message = '', int $code = 0, Exception $previous = null)
CMS base exception class constructor. Inherits the native PHP Exception.
All CMS related classes should inherit this class, it creates a set of unified properties and an interface for displaying the CMS exception page.
at line 70
string
getClassName()
Returns the class name of the called Exception.
at line 79
string
getErrorType()
Returns the error type derived from the error code used.
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.
at line 102
static void
unmask()
Removes the active mask from the called class.
at line 112
void
setMask(Exception $exception)
If this exception acts as a mask, sets the face for the foreign exception.
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.
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.
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.
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.
at line 218
array
getCallStack()
Returns the call stack as an array of values containing a stack information object.
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
at line 311
protected string
formatStackArguments(array $arguments)
Prepares a function or method argument list for display in HTML or text format