File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/Illuminate/Http/Exceptions Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use RuntimeException ;
6
6
use Symfony \Component \HttpFoundation \Response ;
7
+ use Throwable ;
7
8
8
9
class HttpResponseException extends RuntimeException
9
10
{
@@ -18,10 +19,13 @@ class HttpResponseException extends RuntimeException
18
19
* Create a new HTTP response exception instance.
19
20
*
20
21
* @param \Symfony\Component\HttpFoundation\Response $response
22
+ * @param \Throwable $previous
21
23
* @return void
22
24
*/
23
- public function __construct (Response $ response )
25
+ public function __construct (Response $ response, ? Throwable $ previous = null )
24
26
{
27
+ parent ::__construct ($ previous ?->getMessage() ?? '' , $ previous ?->getCode() ?? 0 , $ previous );
28
+
25
29
$ this ->response = $ response ;
26
30
}
27
31
You can’t perform that action at this time.
0 commit comments