vB_Exception_Api_Disabled
extends vB_Exception_Api
in package
Api Exception Exception thrown by API methods
Table of Contents
- $config_debug : string
- The vb option that decides whether to debug the exception.
- $critical : bool
- Whether the exception is considered as critical by default.
- $errors : mixed
- $logged : bool
- Whether the exception has already been logged.
- $mailed : bool
- Whether the exception has already been mailed.
- $option_log : sring
- The vb option that decides whether to log the exception.
- $option_mail : string
- The vb option that decides whether to mail the admin about the exception.
- __construct() : mixed
- Constructor.
- __serialize() : mixed
- __sleep() : mixed
- __toString() : mixed
- Magic method.
- __unserialize() : mixed
- __wakeup() : mixed
- add_error() : mixed
- get_errors() : mixed
- getFullTrace() : string
- Returns the stack trace for an exception
- has_error() : mixed
- has_errors() : mixed
- isCritical() : bool
- Checks if an exception is considered critical.
- logError() : mixed
- Logs details of the error.
- mailError() : mixed
- Sends details of the error to a configured email address.
- toString() : string
- Creates a string representation of the error.
Properties
$config_debug
The vb option that decides whether to debug the exception.
protected
string
$config_debug
If debugging of the exception is enabled and the exception is not already considered critical then a vB_Exception_Critical will be thrown.
Tags
$critical
Whether the exception is considered as critical by default.
protected
bool
$critical
If the exception is considered critical then a new vB_Exception_Critical will not be thrown when debugging errors.
$errors
protected
mixed
$errors
= array()
$logged
Whether the exception has already been logged.
protected
bool
$logged
$mailed
Whether the exception has already been mailed.
protected
bool
$mailed
$option_log
The vb option that decides whether to log the exception.
protected
sring
$option_log
$option_mail
The vb option that decides whether to mail the admin about the exception.
protected
string
$option_mail
Methods
__construct()
Constructor.
public
__construct(string $message[, int $code = false ][, string $file = false ][, int $line = false ]) : mixed
Checks whether the error should be logged, mailed and/or debugged.
Parameters
- $message : string
-
- A description of the error
- $code : int = false
-
- The PHP code of the error
- $file : string = false
-
- The file the exception was thrown from
- $line : int = false
-
- The line the exception was thrown from
Tags
Return values
mixed —__serialize()
public
__serialize() : mixed
Return values
mixed —__sleep()
public
__sleep() : mixed
Return values
mixed —__toString()
Magic method.
public
__toString() : mixed
Seperated from toString function because __toString cannot take parameters in 5.3
Return values
mixed —__unserialize()
public
__unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed
Return values
mixed —__wakeup()
public
__wakeup() : mixed
Return values
mixed —add_error()
public
add_error(mixed $phrase_id[, array<string|int, mixed> $args = array() ]) : mixed
Parameters
- $phrase_id : mixed
- $args : array<string|int, mixed> = array()
Return values
mixed —get_errors()
public
get_errors() : mixed
Return values
mixed —getFullTrace()
Returns the stack trace for an exception
public
static getFullTrace(Exception $e) : string
The exception class provides a getTrace and getTraceAsString function, but maddeningly, these do not include the line on which the exception was thrown. This function adds that information the to the string trace and returns it
Declared as as static function so we can use this with other people's exceptions
as well as our own.
Parameters
- $e : Exception
Return values
string —has_error()
public
has_error(mixed $phrase_id) : mixed
Parameters
- $phrase_id : mixed
Return values
mixed —has_errors()
public
has_errors() : mixed
Return values
mixed —isCritical()
Checks if an exception is considered critical.
public
isCritical() : bool
Return values
bool —logError()
Logs details of the error.
public
logError() : mixed
Return values
mixed —mailError()
Sends details of the error to a configured email address.
public
mailError() : mixed
Return values
mixed —toString()
Creates a string representation of the error.
public
toString([bool $verbose = false ]) : string
This is useful when logging or mailing the error and displays full details of the error and where it occurred, including a full stack trace.
Parameters
- $verbose : bool = false
-
- Whether to display full details