ts3phpframework
Loading...
Searching...
No Matches
PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception Class Reference

Enhanced exception class for TeamSpeak3 objects. More...

Inheritance diagram for PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception:
PlanetTeamSpeak\TeamSpeak3Framework\Exception\AdapterException PlanetTeamSpeak\TeamSpeak3Framework\Exception\FileTransferException PlanetTeamSpeak\TeamSpeak3Framework\Exception\HelperException PlanetTeamSpeak\TeamSpeak3Framework\Exception\NodeException PlanetTeamSpeak\TeamSpeak3Framework\Exception\ProfilerException PlanetTeamSpeak\TeamSpeak3Framework\Exception\TransportException PlanetTeamSpeak\TeamSpeak3Framework\Exception\ServerQueryException PlanetTeamSpeak\TeamSpeak3Framework\Exception\SignalException

Public Member Functions

 __construct (string $mesg, int $code=0x00)
 getRawCode ()
 getRawMessage ()
 getSender ()

Static Public Member Functions

static registerCustomMessage (int $code, string $mesg)
static unregisterCustomMessage (int $code)

Protected Member Functions

 prepareCustomMessage (StringHelper $mesg)

Protected Attributes

int $raw_code = 0x00
StringHelper string null $raw_mesg = null

Static Protected Attributes

static array $messages = []

Detailed Description

Enhanced exception class for TeamSpeak3 objects.

Definition at line 15 of file TeamSpeak3Exception.php.

Constructor & Destructor Documentation

◆ __construct()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::__construct ( string $mesg,
int $code = 0x00 )

The TeamSpeak3Exception constructor.

Parameters
string$mesg
integer$code

Definition at line 44 of file TeamSpeak3Exception.php.

Member Function Documentation

◆ getRawCode()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::getRawCode ( )

Returns the original error code.

Returns
integer

Definition at line 114 of file TeamSpeak3Exception.php.

◆ getRawMessage()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::getRawMessage ( )

Returns the original error message.

Returns
string|StringHelper|null

Definition at line 124 of file TeamSpeak3Exception.php.

◆ getSender()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::getSender ( )

Returns the class from which the exception was thrown.

Returns
string

Definition at line 134 of file TeamSpeak3Exception.php.

◆ prepareCustomMessage()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::prepareCustomMessage ( StringHelper $mesg)
protected

Prepares a custom error message by replacing pre-defined signs with given values.

Parameters
StringHelper$mesg
Returns
string

Definition at line 64 of file TeamSpeak3Exception.php.

◆ registerCustomMessage()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::registerCustomMessage ( int $code,
string $mesg )
static

Registers a custom error message to $code.

Parameters
integer$code
string$mesg
Returns
void
Exceptions
TeamSpeak3Exception

Definition at line 84 of file TeamSpeak3Exception.php.

◆ unregisterCustomMessage()

PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::unregisterCustomMessage ( int $code)
static

Unregisters a custom error message from $code.

Parameters
integer$code
Returns
void
Exceptions
TeamSpeak3Exception

Definition at line 100 of file TeamSpeak3Exception.php.

Member Data Documentation

◆ $messages

array PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::$messages = []
staticprotected

Definition at line 36 of file TeamSpeak3Exception.php.

◆ $raw_code

int PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::$raw_code = 0x00
protected

Definition at line 22 of file TeamSpeak3Exception.php.

◆ $raw_mesg

StringHelper string null PlanetTeamSpeak\TeamSpeak3Framework\Exception\TeamSpeak3Exception::$raw_mesg = null
protected

Definition at line 29 of file TeamSpeak3Exception.php.


The documentation for this class was generated from the following file: