utils/ckeditorerror
module
Constants
DOCUMENTATION_URL: 'https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html'module:utils/ckeditorerror~DOCUMENTATION_URLURL to the documentation with error codes.
Classes
module:utils/ckeditorerror~CKEditorError
Functions
logError( errorName, data? ) → voidmodule:utils/ckeditorerror~logErrorLogs 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.
Copy code/** * 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
logWarningis enough.See also
CKEditorErrorfor an explanation when to use each method.Parameters
errorName: stringThe error name to be logged.
data?: objectAdditional data to be logged.
Returns
void
logWarning( errorName, data? ) → voidmodule:utils/ckeditorerror~logWarningLogs 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.
Copy code/** * 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
CKEditorErrorfor an explanation when to throw an error and when to log a warning or an error to the console.Parameters
errorName: stringThe error name to be logged.
data?: objectAdditional data to be logged.
Returns
void