Skip to content

Commit

Permalink
StopExecutionWhenProblemProcessor stops execution when a problem occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
Гришин Дмитрий committed Dec 28, 2023
1 parent d5b09e6 commit d7e0831
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Processor/StopExecutionWhenProblemProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function handler(array $record)
$message = $record['message'] ?? 'no message';
$message .= PHP_EOL . (new Exception())->getTraceAsString();
fwrite(STDERR, PHP_EOL . __FILE__ . ':' . __LINE__ . ' : ' . $message . PHP_EOL);
exit(1);
// trigger_error() вызвать нельзя, т.к. выполнится перехват хендлером, например \Symfony\Bridge\PhpUnit\DeprecationErrorHandler::handleError()
}
}

0 comments on commit d7e0831

Please sign in to comment.