Class: ErrorHandler

ErrorHandler()

new ErrorHandler()

A class to handle and manage errors and warnings in the application. Provides methods for error tracking, warning management, and report generation.

Properties:
Name Type Description
errors Array.<Object>

Array storing error objects with timestamp, context, message, stack trace, and fatal status

warnings Array.<Object>

Array storing warning objects with timestamp, context, and message

Source:
Example
const errorHandler = new ErrorHandler();
try {
  // Some code that might throw
} catch (error) {
  errorHandler.handleError(error, 'MyContext', false);
}