Represents an exception thrown during an RPC.

Instantiable
ExtendsException
ImplementsThrowable
Methods
public __construct( $message, $code, $status, array $optionalArgs = [])
 
ApiException constructor.

    public __toString()
     
    String representation of ApiException

    • return string
    public Exception::__wakeup()
    public static createFromApiResponse( $basicMessage, $rpcCode, ?array $metadata = NULL, ?Exception $previous = NULL)
    public static createFromRpcStatus(Google\Rpc\Status $status)
    public static createFromStdClass( $status)
    public getBasicMessage()
     


    • return null|string
    public final Exception::getCode()
    public final Exception::getFile()
    public final Exception::getLine()
    public final Exception::getMessage()
    public getMetadata()
     


    • return array
    public final Exception::getPrevious()
    public getStatus()
    public final Exception::getTrace()
    public final Exception::getTraceAsString()
    Properties
    protected Exception::$code
    protected Exception::$file
    protected Exception::$line
    protected Exception::$message
    Properties
    private $basicMessage
    private $metadata
    private $status
    Methods
    private final Exception::__clone()
    private static create( $basicMessage, $rpcCode, $metadata, array $decodedMetadata, $previous = NULL)
     
    Construct an ApiException with a useful message, including decoded metadata.

    Methods
    private static create( $basicMessage, $rpcCode, $metadata, array $decodedMetadata, $previous = NULL)
     
    Construct an ApiException with a useful message, including decoded metadata.

    public static createFromApiResponse( $basicMessage, $rpcCode, ?array $metadata = NULL, ?Exception $previous = NULL)
    public static createFromRpcStatus(Google\Rpc\Status $status)
    public static createFromStdClass( $status)
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only