-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling for command-line scripts
Commit 461a711 added CLI-specific handling for errors to display messages without HTML formatting. This introduced a regression, causing scripts to abort even for non-critical errors that would normally allow execution to continue (such as PHP warnings as well as system and deprecated notices). Furthermore, in that case the exit code is 0, so the caller is not able to detect the failure to take appropriate action. This improves how CLI errors are managed, making it similar to regular MantisBT error handling, i.e. - honor $g_display_errors settings - abort only for DISPLAY_ERROR_HALT (in that case exit code is 1) - don't print message if DISPLAY_ERROR_NONE - handle E_DEPRECATED error type - improve message for unhandled error types - print a debug backtrace when show_detailed_errors == ON Fixes #17270
- Loading branch information
Showing
1 changed file
with
96 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters