| @@ 161-168 (lines=8) @@ | ||
| 158 | }; |
|
| 159 | }; |
|
| 160 | if ($this->config['bypass_error_handlers'] === true ) { |
|
| 161 | $this->container['errorHandler'] = function ($container) { |
|
| 162 | return function ($request, $response, $exception) use ($container) { |
|
| 163 | $response->getBody()->rewind(); |
|
| 164 | return $response->withStatus(500) |
|
| 165 | ->withHeader('Content-Type', 'text/html') |
|
| 166 | ->write($exception->getMessage()); |
|
| 167 | }; |
|
| 168 | }; |
|
| 169 | $this->container['phpErrorHandler'] = function ($container) { |
|
| 170 | return function ($request, $response, $error) use ($container) { |
|
| 171 | $response->getBody()->rewind(); |
|
| @@ 169-176 (lines=8) @@ | ||
| 166 | ->write($exception->getMessage()); |
|
| 167 | }; |
|
| 168 | }; |
|
| 169 | $this->container['phpErrorHandler'] = function ($container) { |
|
| 170 | return function ($request, $response, $error) use ($container) { |
|
| 171 | $response->getBody()->rewind(); |
|
| 172 | return $response->withStatus(500) |
|
| 173 | ->withHeader('Content-Type', 'text/html') |
|
| 174 | ->write($error->getMessage()); |
|
| 175 | }; |
|
| 176 | }; |
|
| 177 | } |
|
| 178 | $this->app->run(); |
|
| 179 | } |
|