Skip to content

Commit

Permalink
Merge pull request #3 from diknik/stop_execution
Browse files Browse the repository at this point in the history
StopExecutionWhenProblemProcessor stops execution when a problem occurs
  • Loading branch information
yapro authored Dec 28, 2023
2 parents d5b09e6 + d7e0831 commit d2c1de7
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 d2c1de7

Please sign in to comment.