File tree 1 file changed +13
-10
lines changed
src/Symfony/Component/HttpClient
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ public function sendRequest(RequestInterface $request): ResponseInterface
105
105
/**
106
106
* @internal
107
107
*/
108
- trait Psr18ExceptionTrait
108
+ class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface
109
109
{
110
110
private $ request ;
111
111
@@ -121,18 +121,21 @@ public function getRequest(): RequestInterface
121
121
}
122
122
}
123
123
124
- /**
125
- * @internal
126
- */
127
- class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface
128
- {
129
- use Psr18ExceptionTrait;
130
- }
131
-
132
124
/**
133
125
* @internal
134
126
*/
135
127
class Psr18RequestException extends \InvalidArgumentException implements RequestExceptionInterface
136
128
{
137
- use Psr18ExceptionTrait;
129
+ private $ request ;
130
+
131
+ public function __construct (TransportExceptionInterface $ e , RequestInterface $ request )
132
+ {
133
+ parent ::__construct ($ e ->getMessage (), 0 , $ e );
134
+ $ this ->request = $ request ;
135
+ }
136
+
137
+ public function getRequest (): RequestInterface
138
+ {
139
+ return $ this ->request ;
140
+ }
138
141
}
You can’t perform that action at this time.
0 commit comments