ErrorManager

Type: Class

How to get errorManager?

JavaScript

import errorManager from 'fontoxml-errors/src/errorManager.js'

Allows applications to be notified when errors occur.

Properties

CMS_REQUEST_FAILED

A request to the CMS returned an error.

This could be part of normal operations. Please refer to the CMS connectors API documentation for details.

The CmsErrorData for these errors contains details about the request. If the CMS returned an error, the error object will contain a status property with the HTTP status code that was returned.

DOCUMENT_SAVE_FAILED

Saving one or more documents failed due to an unrecoverable error.

These errors do not currently provide any ErrorData.

INITIAL_DOCUMENT_LOAD_FAILED

Fonto failed to load all of its initial documents (i.e., those passed in the scope parameter).

These errors do not currently provide any ErrorData.

NETWORK_CONNECTION_ERROR

Network connection failed

This occurs if there is a network issue.

OPERATION_FAILED

An operation encountered an error during its execution or state computation.

These errors do not currently provide any ErrorData.

UI_FAILED

A UI component failed to render or update correctly.

This occurs if an error is caught by the editor's root React components. The UiErrorData contains the component stack in which the error occurred.

UNKNOWN

The origin of the error can not be determined.

XQUERY_FAILED

XQuery failed

This occurs if an error when parsing, compiling or executing XQuery or XPath expressions

Methods

addFatalErrorCallback

Type: Function

Register a callback that will be called if a fatal error occurs.

Arguments

Returns

addNonFatalErrorCallback

Type: Function

Register a callback that will be called if a non-fatal error occurs.

Arguments

Returns