# new ErrorHandler(coreObj) → {Server.Modules.ErrorHandler}
This is the ErrorHandler Module of the Blackrock Application Server. It provides tools to listen for and catch exceptions server-wide and to handle these exceptions, as opposed to letting the server crash.
Parameters:
Name | Type | Description |
---|---|---|
coreObj |
Server.Modules.Core | The Parent Core Object |
- Copyright:
- Copyright (c) 2021 Darren Smith
- License:
- Licensed under the LGPL license.
- Source:
Returns:
module - The ErrorHandler Module
Example
Tbc...
Extends
Events
# errorthrown
The ErrorThrown event is fired on the ErrorHandler module instance whenever an unhandled exception occurs within the application server.
- string
- Source:
Example
Tbc...
# event:errorhandled
If you listen to the ErrorHandler module instance and detect an ErrorThrown event, you can handle it and then fire/emit an ErrorHandled event back to the ErrorHandler module instance to tell the application server that the error has been handled. This should prevent the server from crashing.
- Source:
Example
Tbc...