Class \Prado\Exceptions\TException
TException is the base class for all PRADO exceptions.
TException provides the functionality of translating an error code into a descriptive error message in a language that is preferred by user browser. Additional parameters may be passed together with the error code so that the translated message contains more detailed information.
Old style TException only have an error Message Code as follows:
throw new TException('component_error_message_code'[, $param1, $param2, ..., $chainedException]);
The parameters and $chainedException are optional. $chainedException may be entirely left out.
To include an actual integer error Code, new style PRADO Exceptions should be used. The new style is as follows:
throw new TException($errorCode, 'component_error_message_code'[, $param1, $param2, ..., $chainedException]);
Please note that the Error Code and Error Message/Message-Code is swapped to the Normal PHP Exceptions (where the $message is the first parameter and $code is the second). This done to support Error Message Parameters.
By default, TException looks for a message file by calling getErrorMessageFile() method, which uses the "message-xx.txt" file located under "Prado\Exceptions" folder, where "xx" is the code of the user preferred language. If such a file is not found, "message.txt" will be used instead.
Class hierarchy
Author: Qiang Xue <qiang.xue@gmail.com>Since: 3.0
public
|
__construct(int|string $errorCode[, string $errorMessage = null ], array<string|int, mixed> ...$args) : mixed
Constructor.
|
public
static
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
protected
|
|
protected
|
|