Enhanced exception class for TeamSpeak3_Adapter_ServerQuery objects.
More...
|
| getSender () |
| Returns the class from which the exception was thrown.
|
|
|
static | $messages = array() |
|
Enhanced exception class for TeamSpeak3_Adapter_ServerQuery objects.
Definition at line 32 of file Exception.php.
static TeamSpeak3_Exception::registerCustomMessage |
( |
|
$code, |
|
|
|
$mesg |
|
) |
| |
|
staticinherited |
Registers a custom error message to $code.
- Parameters
-
- Exceptions
-
- Returns
- void
Definition at line 86 of file Exception.php.
{
if(array_key_exists((int) $code, self::$messages))
{
throw new self("custom message for code 0x" . strtoupper(dechex($code)) . " is already registered");
}
if(!is_string($mesg))
{
throw new self("custom message for code 0x" . strtoupper(dechex($code)) . " must be a string");
}
}
static TeamSpeak3_Exception::unregisterCustomMessage |
( |
|
$code | ) |
|
|
staticinherited |
Unregisters a custom error message from $code.
- Parameters
-
- Exceptions
-
- Returns
- void
Definition at line 108 of file Exception.php.
{
if(!array_key_exists((int) $code, self::$messages))
{
throw new self("custom message for code 0x" . strtoupper(dechex($code)) . " is not registered");
}
unset(self::$messages[intval($code)]);
}
TeamSpeak3_Exception::getSender |
( |
| ) |
|
|
inherited |
Returns the class from which the exception was thrown.
- Returns
- string
Definition at line 123 of file Exception.php.
{
$trace = $this->getTrace();
return (isset($trace[0]["class"])) ? $trace[0]["class"] : "{main}";
}
The documentation for this class was generated from the following file: