PluginProbe
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) / 1.3.2
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) v1.3.2
9.1.2 9.1.1 9.1.0 9.0.2 9.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 All 153 releases
wp-analytify / lib / Google / Service / Exception.php

Exception.php in Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) 1.3.2, at lib/Google/Service/Exception.php

54 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 require_once ANALYTIFY_LIB_PATH . 'Google/Exception.php';
4
5 class Analytify_Google_Service_Exception extends Analytify_Google_Exception
6 {
7 /**
8 * Optional list of errors returned in a JSON body of an HTTP error response.
9 */
10 protected $errors = array();
11
12 /**
13 * Override default constructor to add ability to set $errors.
14 *
15 * @param string $message
16 * @param int $code
17 * @param Exception|null $previous
18 * @param [{string, string}] errors List of errors returned in an HTTP
19 * response. Defaults to [].
20 */
21 public function __construct(
22 $message,
23 $code = 0,
24 Exception $previous = null,
25 $errors = array()
26 ) {
27 if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
28 parent::__construct($message, $code, $previous);
29 } else {
30 parent::__construct($message, $code);
31 }
32
33 $this->errors = $errors;
34 }
35
36 /**
37 * An example of the possible errors returned.
38 *
39 * {
40 * "domain": "global",
41 * "reason": "authError",
42 * "message": "Invalid Credentials",
43 * "locationType": "header",
44 * "location": "Authorization",
45 * }
46 *
47 * @return [{string, string}] List of errors return in an HTTP response or [].
48 */
49 public function getErrors()
50 {
51 return $this->errors;
52 }
53 }
54