mirror of
https://github.com/sern-handler/website
synced 2026-06-06 09:26:46 +00:00
Compare commits
6 Commits
error-hand
...
jacoobes-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
515d2ced78 | ||
|
|
8e9d895d1a | ||
|
|
5055daac9b | ||
|
|
1da3e57866 | ||
|
|
9d2c3f6582 | ||
|
|
d5cee30e4f |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "./node_modules/@lunariajs/core/config.schema.json",
|
||||
"repository": {
|
||||
"name": "durocodes/sern-website"
|
||||
"name": "sern-handler/website"
|
||||
},
|
||||
"defaultLocale": {
|
||||
"label": "English",
|
||||
|
||||
@@ -7,6 +7,7 @@ sidebar:
|
||||
|
||||
Error handling is important in any application, especially one which has a long lifetime of running.
|
||||
|
||||
|
||||
## Handling errors in command and event modules
|
||||
|
||||
To capture errors, enable the 'error' event in sern's global event manager.
|
||||
@@ -49,6 +50,11 @@ export default eventModule({
|
||||
If the error handler is not set, sern's behavior is to crash the application.
|
||||
This respects [node.js's default behavior](https://nodejs.org/api/events.html#error-events)
|
||||
|
||||
:::tip
|
||||
|
||||
enable `handleModuleErrors` to handle errors that occur within modules.
|
||||
|
||||
:::
|
||||
|
||||
:::caution
|
||||
|
||||
|
||||
Reference in New Issue
Block a user