class ApiException extends Exception (View source)

Represents an exception thrown during an RPC.

Methods

__construct(string $message, int $code, string $status, array $optionalArgs = [])

ApiException constructor.

getStatus()

No description

static ApiException
createFromStdClass(stdClass $status)

No description

static ApiException
createFromApiResponse(string $basicMessage, int $rpcCode, array $metadata = null, Exception $previous = null)

No description

static ApiException
createFromRpcStatus(Status $status)

No description

null|string
getBasicMessage()

No description

array
getMetadata()

No description

string
__toString()

String representation of ApiException

Details

__construct(string $message, int $code, string $status, array $optionalArgs = [])

ApiException constructor.

Parameters

string $message
int $code
string $status
array $optionalArgs

{ @type Exception|null $previous @type array|null $metadata @type string|null $basicMessage }

getStatus()

No description

static ApiException createFromStdClass(stdClass $status)

No description

Parameters

stdClass $status

Return Value

ApiException

static ApiException createFromApiResponse(string $basicMessage, int $rpcCode, array $metadata = null, Exception $previous = null)

No description

Parameters

string $basicMessage
int $rpcCode
array $metadata
Exception $previous

Return Value

ApiException

static ApiException createFromRpcStatus(Status $status)

No description

Parameters

Status $status

Return Value

ApiException

null|string getBasicMessage()

No description

Return Value

null|string

array getMetadata()

No description

Return Value

array

string __toString()

String representation of ApiException

Return Value

string