utils/ckeditorerror
@ckeditor/ckeditor5-utils/src/ckeditorerror
Filtering
Constants
-
DOCUMENTATION_URL
module:utils/ckeditorerror~DOCUMENTATION_URL
URL to the documentation with error codes.
Classes
-
CKEditorError
module:utils/ckeditorerror~CKEditorError
The CKEditor error class.
Functions
-
logError( errorName, [ data ] )
module:utils/ckeditorerror~logError
Logs an error to the console with a properly formatted message and adds a link to the documentation. Use whenever you want to log an error to the console.
/** * There was a problem processing the configuration of the toolbar. The item with the given * name does not exist, so it was omitted when rendering the toolbar. * * @error toolbarview-item-unavailable * @param {String} name The name of the component. * / logError( 'toolbarview-item-unavailable', { name } );
Note: In most cases logging a warning using
logWarning
is enough.See also
CKEditorError
for an explanation when to use each method.Parameters
errorName : String
The error name to be logged.
[ data ] : Object
Additional data to be logged.
-
logWarning( errorName, [ data ] )
module:utils/ckeditorerror~logWarning
Logs a warning to the console with a properly formatted message and adds a link to the documentation. Use whenever you want to log a warning to the console.
/** * There was a problem processing the configuration of the toolbar. The item with the given * name does not exist, so it was omitted when rendering the toolbar. * * @error toolbarview-item-unavailable * @param {String} name The name of the component. * / logWarning( 'toolbarview-item-unavailable', { name } );
See also
CKEditorError
for an explanation when to throw an error and when to log a warning or an error to the console.Parameters
errorName : String
The error name to be logged.
[ data ] : Object
Additional data to be logged.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.