ErrorHandler

Server.Modules. ErrorHandler

# 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

Author:
  • Darren Smith
License:
  • Licensed under the LGPL license.
Returns:

module - The ErrorHandler Module

Type
Server.Modules.ErrorHandler
Example
Tbc...

Extends

Events

# errorthrown

The ErrorThrown event is fired on the ErrorHandler module instance whenever an unhandled exception occurs within the application server.

Type:
  • string
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.

Example
Tbc...