-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: catch panics; more info on the error page (#35)
- Loading branch information
Showing
9 changed files
with
583 additions
and
107 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// Debug mode flag | ||
/// | ||
/// This enables some expensive operations that are useful for debugging, such | ||
/// as logging additional information, and collecting some extra diagnostics | ||
/// for generating error pages. This hurts the performance, so it should be | ||
/// disabled for production. | ||
/// | ||
/// This is `true` when the application is compiled in debug mode, and `false` | ||
/// when it is compiled in release mode. | ||
pub(crate) const DEBUG_MODE: bool = cfg!(debug_assertions); | ||
|
||
/// Whether to display a nice, verbose error page when an error, panic, or | ||
/// 404 "Not Found" occurs. | ||
pub(crate) const DISPLAY_ERROR_PAGE: bool = DEBUG_MODE; | ||
|
||
pub(crate) const REGISTER_PANIC_HOOK: bool = true; |
Oops, something went wrong.