MPDException

MPDException is a slightly modified version of a standard Exception. You may call MPDException::getCode and MPDException::getMessage to retrieve information about the error.

In case an error occurs at the protocol level the called methods simply return false.

To retrieve the last occurred error call MphpD::get_last_error.

MphpD::get_last_error() : array

Methods

__construct

MPDException::__construct( $message = '',  $code = 0, ?Throwable $previous = null, string $command = '', int $commandlist_num = 0) : mixed

Parameters

Returns mixed

__toString

Returns all information as string

MPDException::__toString() : string

Parameters

Returns string

string

getCommand

Returns the command which caused the error.

MPDException::getCommand() : string

Parameters

Returns string

string

getCommandlistNum

Returns the command's list-number in case a commandlist was used.

MPDException::getCommandlistNum() : int

Parameters

Returns int

int

__wakeup

MPDException::__wakeup() : mixed

Parameters

Returns mixed

getMessage

MPDException::getMessage() : string

Parameters

Returns string

getCode

MPDException::getCode() : mixed

Parameters

Returns mixed

getFile

MPDException::getFile() : string

Parameters

Returns string

getLine

MPDException::getLine() : int

Parameters

Returns int

getTrace

MPDException::getTrace() : array

Parameters

Returns array

getPrevious

MPDException::getPrevious() : Throwable

Parameters

Returns Throwable

getTraceAsString

MPDException::getTraceAsString() : string

Parameters

Returns string

© 2023 Florian Faber