Skip to content

Commit

Permalink
Refactored exception/error handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbankowski committed Dec 11, 2023
1 parent 5849923 commit d4ab706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ouzo/Core/ExceptionHandling/DebugExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DebugExceptionHandler extends ExceptionHandler
{
public function runDefaultHandler($exception): void
{
if ($this->needPrettyHandler()) {
if ($this->isPrettyHandlerNeeded()) {
$run = new Run();
$run->pushHandler(new PrettyPageHandler());
$run->pushHandler(new DebugErrorLogHandler());
Expand All @@ -26,7 +26,7 @@ public function runDefaultHandler($exception): void
}
}

private function needPrettyHandler(): bool
private function isPrettyHandlerNeeded(): bool
{
$isHtmlResponse = ResponseTypeResolve::resolve() === MediaType::TEXT_HTML;
return $isHtmlResponse && !Uri::isAjax();
Expand Down

0 comments on commit d4ab706

Please sign in to comment.