Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Google_Service_Exception Class Reference
Inheritance diagram for Google_Service_Exception:
Google_Exception Google_Task_Retryable Exception

Public Member Functions

 __construct ( $message, $code=0, Exception $previous=null, $errors=array(), array $retryMap=null)
 Override default constructor to add the ability to set $errors and a retry map.
 
 allowedRetries ()
 Gets the number of times the associated task can be retried.
 
 getErrors ()
 An example of the possible errors returned.
 

Protected Attributes

 $errors = array()
 

Constructor & Destructor Documentation

◆ __construct()

Google_Service_Exception::__construct ( $message,
$code = 0,
Exception $previous = null,
$errors = array(),
array $retryMap = null )

Override default constructor to add the ability to set $errors and a retry map.

Parameters
string$message
int$code
Exception | null$previous
[{string,string}]errors List of errors returned in an HTTP response. Defaults to [].
array | null$retryMapMap of errors with retry counts.

Member Function Documentation

◆ allowedRetries()

Google_Service_Exception::allowedRetries ( )

Gets the number of times the associated task can be retried.

NOTE: -1 is returned if the task can be retried indefinitely

Return values
integer

Implements Google_Task_Retryable.

◆ getErrors()

Google_Service_Exception::getErrors ( )

An example of the possible errors returned.

{ "domain": "global", "reason": "authError", "message": "Invalid Credentials", "locationType": "header", "location": "Authorization", }

Return values
[{string,string}]List of errors return in an HTTP response or [].

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