|
15 | 15 | use Symfony\Component\HttpKernel\Exception\HttpException; |
16 | 16 | use Pterodactyl\Exceptions\Repository\RecordNotFoundException; |
17 | 17 | use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; |
18 | | -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; |
19 | 18 |
|
20 | 19 | class Handler extends ExceptionHandler |
21 | 20 | { |
@@ -154,26 +153,6 @@ public function render($request, Exception $exception) |
154 | 153 | $connections->rollBack(0); |
155 | 154 | } |
156 | 155 |
|
157 | | - // Because of some breaking change snuck into a Laravel update that didn't get caught |
158 | | - // by any of the tests, exceptions implementing the HttpExceptionInterface get marked |
159 | | - // as being HttpExceptions, but aren't actually implementing the HttpException abstract. |
160 | | - // |
161 | | - // This is incredibly annoying because we can't just temporarily override the handler to |
162 | | - // allow these (at least without taking on a high maintenance cost). Laravel 5.8 fixes this, |
163 | | - // so when we update (or have updated) this code can be removed. |
164 | | - // |
165 | | - // @see https://github.com/laravel/framework/pull/25975 |
166 | | - // @todo remove this code when upgrading to Laravel 5.8 |
167 | | - if ($exception instanceof HttpExceptionInterface && ! $exception instanceof HttpException) { |
168 | | - $exception = new HttpException( |
169 | | - $exception->getStatusCode(), |
170 | | - $exception->getMessage(), |
171 | | - $exception, |
172 | | - $exception->getHeaders(), |
173 | | - $exception->getCode() |
174 | | - ); |
175 | | - } |
176 | | - |
177 | 156 | return parent::render($request, $exception); |
178 | 157 | } |
179 | 158 |
|
|
0 commit comments