Sign up (with export icon)

EditorErrorData

Api-interface iconinterface

What a callback registered with onEditorError receives.

Properties

  • Chevron-right icon

    The error that escaped.

  • Chevron-right icon

    The editor or context the error came from — the editor as a whole, not the object that threw. That one is in error.context, and it is whatever the throwing code happened to have at hand: a plugin, a command, the model, a writer.

    Compare this with your own instance to tell whether the error came from an editor you manage.

    When editors share an object, an error can be attributed to more than one of them. The callback is then called once for each, with the same error and a different source, so source may be an editor the error did not come from.

    null is reserved for errors that could not be attributed. Under the current filter such an error is not reported at all, but the type does not promise that, so that the filter stays a policy rather than part of the contract.