8
8
/**
9
9
* @author GeLo <[email protected] >
10
10
*/
11
- class MultiHttpClientException extends \Exception implements Exception
11
+ class MultiHttpClientException extends \RuntimeException implements Exception
12
12
{
13
13
/**
14
- * @var HttpAdapterException []
14
+ * @var HttpClientException []
15
15
*/
16
16
private $ exceptions ;
17
17
@@ -21,8 +21,8 @@ class MultiHttpClientException extends \Exception implements Exception
21
21
private $ responses ;
22
22
23
23
/**
24
- * @param HttpAdapterException [] $exceptions
25
- * @param ResponseInterface[] $responses
24
+ * @param HttpClientException [] $exceptions
25
+ * @param ResponseInterface[] $responses
26
26
*/
27
27
public function __construct (array $ exceptions = [], array $ responses = [])
28
28
{
@@ -35,7 +35,7 @@ public function __construct(array $exceptions = [], array $responses = [])
35
35
/**
36
36
* Returns all exceptions
37
37
*
38
- * @return HttpAdapterException []
38
+ * @return HttpClientException []
39
39
*/
40
40
public function getExceptions ()
41
41
{
@@ -45,11 +45,11 @@ public function getExceptions()
45
45
/**
46
46
* Checks if a specific exception exists
47
47
*
48
- * @param HttpAdapterException $exception
48
+ * @param HttpClientException $exception
49
49
*
50
50
* @return boolean TRUE if there is the exception else FALSE.
51
51
*/
52
- public function hasException (HttpAdapterException $ exception )
52
+ public function hasException (HttpClientException $ exception )
53
53
{
54
54
return array_search ($ exception , $ this ->exceptions , true ) !== false ;
55
55
}
@@ -67,7 +67,7 @@ public function hasExceptions()
67
67
/**
68
68
* Sets the exceptions
69
69
*
70
- * @param HttpAdapterException [] $exceptions
70
+ * @param HttpClientException [] $exceptions
71
71
*/
72
72
public function setExceptions (array $ exceptions )
73
73
{
@@ -78,17 +78,17 @@ public function setExceptions(array $exceptions)
78
78
/**
79
79
* Adds an exception
80
80
*
81
- * @param HttpAdapterException $exception
81
+ * @param HttpClientException $exception
82
82
*/
83
- public function addException (HttpAdapterException $ exception )
83
+ public function addException (HttpClientException $ exception )
84
84
{
85
85
$ this ->exceptions [] = $ exception ;
86
86
}
87
87
88
88
/**
89
89
* Adds some exceptions
90
90
*
91
- * @param HttpAdapterException [] $exceptions
91
+ * @param HttpClientException [] $exceptions
92
92
*/
93
93
public function addExceptions (array $ exceptions )
94
94
{
@@ -100,9 +100,9 @@ public function addExceptions(array $exceptions)
100
100
/**
101
101
* Removes an exception
102
102
*
103
- * @param HttpAdapterException $exception
103
+ * @param HttpClientException $exception
104
104
*/
105
- public function removeException (HttpAdapterException $ exception )
105
+ public function removeException (HttpClientException $ exception )
106
106
{
107
107
unset($ this ->exceptions [array_search ($ exception , $ this ->exceptions , true )]);
108
108
$ this ->exceptions = array_values ($ this ->exceptions );
@@ -111,7 +111,7 @@ public function removeException(HttpAdapterException $exception)
111
111
/**
112
112
* Removes some exceptions
113
113
*
114
- * @param HttpAdapterException [] $exceptions
114
+ * @param HttpClientException [] $exceptions
115
115
*/
116
116
public function removeExceptions (array $ exceptions )
117
117
{
0 commit comments