mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4412 from sminnee/4336-error-exit-code
Ensure proper exit code for exceptions & errors (fixes #4336)
This commit is contained in:
commit
712d796c14
@ -531,7 +531,8 @@ function exceptionHandler($exception) {
|
||||
$file = $exception->getFile();
|
||||
$line = $exception->getLine();
|
||||
$context = $exception->getTrace();
|
||||
return Debug::fatalHandler($errno, $message, $file, $line, $context);
|
||||
Debug::fatalHandler($errno, $message, $file, $line, $context);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -550,7 +551,8 @@ function errorHandler($errno, $errstr, $errfile, $errline) {
|
||||
case E_ERROR:
|
||||
case E_CORE_ERROR:
|
||||
case E_USER_ERROR:
|
||||
return Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
|
||||
Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
|
||||
exit(1);
|
||||
|
||||
case E_WARNING:
|
||||
case E_CORE_WARNING:
|
||||
|
Loading…
Reference in New Issue
Block a user