Browse Source

Fix CKEditorError message ids.

Maciej Gołaszewski 5 years ago
parent
commit
f729c2f7fd
77 changed files with 201 additions and 230 deletions
  1. 2 2
      packages/ckeditor-cloud-services-core/src/token/token.js
  2. 5 5
      packages/ckeditor-cloud-services-core/src/uploadgateway/fileuploader.js
  3. 2 2
      packages/ckeditor-cloud-services-core/src/uploadgateway/uploadgateway.js
  4. 1 1
      packages/ckeditor5-ckfinder/src/ckfindercommand.js
  5. 1 1
      packages/ckeditor5-core/src/commandcollection.js
  6. 3 3
      packages/ckeditor5-core/src/context.js
  7. 1 1
      packages/ckeditor5-core/src/editor/utils/attachtoform.js
  8. 1 1
      packages/ckeditor5-core/src/editor/utils/elementapimixin.js
  9. 1 2
      packages/ckeditor5-core/src/editor/utils/securesourceelement.js
  10. 1 1
      packages/ckeditor5-core/src/pendingactions.js
  11. 3 4
      packages/ckeditor5-core/src/plugincollection.js
  12. 1 2
      packages/ckeditor5-core/tests/_utils/classictesteditor.js
  13. 2 3
      packages/ckeditor5-editor-balloon/src/ballooneditor.js
  14. 1 2
      packages/ckeditor5-editor-classic/src/classiceditor.js
  15. 2 3
      packages/ckeditor5-editor-decoupled/src/decouplededitor.js
  16. 2 3
      packages/ckeditor5-editor-inline/src/inlineeditor.js
  17. 4 4
      packages/ckeditor5-engine/src/controller/datacontroller.js
  18. 3 4
      packages/ckeditor5-engine/src/conversion/conversion.js
  19. 1 2
      packages/ckeditor5-engine/src/conversion/downcasthelpers.js
  20. 1 1
      packages/ckeditor5-engine/src/conversion/upcastdispatcher.js
  21. 1 1
      packages/ckeditor5-engine/src/conversion/viewconsumable.js
  22. 2 2
      packages/ckeditor5-engine/src/model/document.js
  23. 2 2
      packages/ckeditor5-engine/src/model/documentselection.js
  24. 1 1
      packages/ckeditor5-engine/src/model/liveposition.js
  25. 7 7
      packages/ckeditor5-engine/src/model/markercollection.js
  26. 2 2
      packages/ckeditor5-engine/src/model/node.js
  27. 3 3
      packages/ckeditor5-engine/src/model/nodelist.js
  28. 3 4
      packages/ckeditor5-engine/src/model/operation/attributeoperation.js
  29. 1 1
      packages/ckeditor5-engine/src/model/operation/detachoperation.js
  30. 1 1
      packages/ckeditor5-engine/src/model/operation/insertoperation.js
  31. 3 3
      packages/ckeditor5-engine/src/model/operation/mergeoperation.js
  32. 3 3
      packages/ckeditor5-engine/src/model/operation/moveoperation.js
  33. 2 2
      packages/ckeditor5-engine/src/model/operation/renameoperation.js
  34. 4 5
      packages/ckeditor5-engine/src/model/operation/rootattributeoperation.js
  35. 4 4
      packages/ckeditor5-engine/src/model/operation/splitoperation.js
  36. 2 4
      packages/ckeditor5-engine/src/model/operation/utils.js
  37. 9 10
      packages/ckeditor5-engine/src/model/position.js
  38. 1 1
      packages/ckeditor5-engine/src/model/range.js
  39. 4 4
      packages/ckeditor5-engine/src/model/schema.js
  40. 5 7
      packages/ckeditor5-engine/src/model/selection.js
  41. 2 2
      packages/ckeditor5-engine/src/model/textproxy.js
  42. 2 2
      packages/ckeditor5-engine/src/model/treewalker.js
  43. 2 3
      packages/ckeditor5-engine/src/model/utils/insertcontent.js
  44. 20 22
      packages/ckeditor5-engine/src/model/writer.js
  45. 1 2
      packages/ckeditor5-engine/src/view/attributeelement.js
  46. 11 12
      packages/ckeditor5-engine/src/view/downcastwriter.js
  47. 1 1
      packages/ckeditor5-engine/src/view/emptyelement.js
  48. 1 1
      packages/ckeditor5-engine/src/view/node.js
  49. 3 4
      packages/ckeditor5-engine/src/view/position.js
  50. 1 1
      packages/ckeditor5-engine/src/view/rawelement.js
  51. 2 2
      packages/ckeditor5-engine/src/view/renderer.js
  52. 5 7
      packages/ckeditor5-engine/src/view/selection.js
  53. 2 2
      packages/ckeditor5-engine/src/view/textproxy.js
  54. 2 2
      packages/ckeditor5-engine/src/view/treewalker.js
  55. 1 1
      packages/ckeditor5-engine/src/view/uielement.js
  56. 1 3
      packages/ckeditor5-engine/src/view/view.js
  57. 1 2
      packages/ckeditor5-font/src/fontsize/fontsizeediting.js
  58. 1 1
      packages/ckeditor5-font/src/fontsize/utils.js
  59. 1 3
      packages/ckeditor5-image/src/imageresize/imageresizebuttons.js
  60. 2 2
      packages/ckeditor5-mention/src/mentioncommand.js
  61. 1 1
      packages/ckeditor5-mention/src/mentionui.js
  62. 2 2
      packages/ckeditor5-ui/src/componentfactory.js
  63. 3 3
      packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js
  64. 4 4
      packages/ckeditor5-ui/src/template.js
  65. 1 1
      packages/ckeditor5-ui/src/view.js
  66. 1 1
      packages/ckeditor5-ui/src/viewcollection.js
  67. 2 2
      packages/ckeditor5-upload/src/filerepository.js
  68. 6 6
      packages/ckeditor5-utils/src/collection.js
  69. 1 1
      packages/ckeditor5-utils/src/focustracker.js
  70. 1 1
      packages/ckeditor5-utils/src/keyboard.js
  71. 12 12
      packages/ckeditor5-utils/src/observablemixin.js
  72. 1 1
      packages/ckeditor5-utils/src/translation-service.js
  73. 1 1
      packages/ckeditor5-utils/src/version.js
  74. 2 2
      packages/ckeditor5-utils/tests/ckeditorerror.js
  75. 1 1
      packages/ckeditor5-utils/tests/emittermixin.js
  76. 1 1
      packages/ckeditor5-widget/src/utils.js
  77. 1 1
      packages/ckeditor5-widget/src/widgettoolbarrepository.js

+ 2 - 2
packages/ckeditor-cloud-services-core/src/token/token.js

@@ -41,7 +41,7 @@ class Token {
 			 * @error token-missing-token-url
 			 */
 			throw new CKEditorError(
-				'token-missing-token-url: A `tokenUrl` must be provided as the first constructor argument.',
+				'token-missing-token-url',
 				this
 			);
 		}
@@ -185,7 +185,7 @@ function defaultRefreshToken( tokenUrl ) {
 				 * @error token-cannot-download-new-token
 				 */
 				return reject(
-					new CKEditorError( 'token-cannot-download-new-token: Cannot download new token from the provided url.', null )
+					new CKEditorError( 'token-cannot-download-new-token', null )
 				);
 			}
 

+ 5 - 5
packages/ckeditor-cloud-services-core/src/uploadgateway/fileuploader.js

@@ -33,7 +33,7 @@ export default class FileUploader {
 			 *
 			 * @error fileuploader-missing-file
 			 */
-			throw new CKEditorError( 'fileuploader-missing-file: File must be provided as the first argument', null );
+			throw new CKEditorError( 'fileuploader-missing-file', null );
 		}
 
 		if ( !token ) {
@@ -42,7 +42,7 @@ export default class FileUploader {
 			 *
 			 * @error fileuploader-missing-token
 			 */
-			throw new CKEditorError( 'fileuploader-missing-token: Token must be provided as the second argument.', null );
+			throw new CKEditorError( 'fileuploader-missing-token', null );
 		}
 
 		if ( !apiAddress ) {
@@ -51,7 +51,7 @@ export default class FileUploader {
 			 *
 			 * @error fileuploader-missing-api-address
 			 */
-			throw new CKEditorError( 'fileuploader-missing-api-address: Api address must be provided as the third argument.', null );
+			throw new CKEditorError( 'fileuploader-missing-api-address', null );
 		}
 
 		/**
@@ -201,7 +201,7 @@ export default class FileUploader {
 						 * @error fileuploader-uploading-data-failed
 						 */
 						return reject( new CKEditorError(
-							'fileuploader-uploading-data-failed: Uploading file failed.',
+							'fileuploader-uploading-data-failed',
 							this,
 							{ message: xhrResponse.message }
 						) );
@@ -270,7 +270,7 @@ function _base64ToBlob( base64, sliceSize = 512 ) {
 		 *
 		 * @error fileuploader-decoding-image-data-error
 		 */
-		throw new CKEditorError( 'fileuploader-decoding-image-data-error: Problem with decoding Base64 image data.', null );
+		throw new CKEditorError( 'fileuploader-decoding-image-data-error', null );
 	}
 }
 

+ 2 - 2
packages/ckeditor-cloud-services-core/src/uploadgateway/uploadgateway.js

@@ -27,7 +27,7 @@ export default class UploadGateway {
 			 *
 			 * @error uploadgateway-missing-token
 			 */
-			throw new CKEditorError( 'uploadgateway-missing-token: Token must be provided.', null );
+			throw new CKEditorError( 'uploadgateway-missing-token', null );
 		}
 
 		if ( !apiAddress ) {
@@ -36,7 +36,7 @@ export default class UploadGateway {
 			 *
 			 * @error uploadgateway-missing-api-address
 			 */
-			throw new CKEditorError( 'uploadgateway-missing-api-address: Api address must be provided.', null );
+			throw new CKEditorError( 'uploadgateway-missing-api-address', null );
 		}
 
 		/**

+ 1 - 1
packages/ckeditor5-ckfinder/src/ckfindercommand.js

@@ -60,7 +60,7 @@ export default class CKFinderCommand extends Command {
 		const openerMethod = this.editor.config.get( 'ckfinder.openerMethod' ) || 'modal';
 
 		if ( openerMethod != 'popup' && openerMethod != 'modal' ) {
-			throw new CKEditorError( 'ckfinder-unknown-openerMethod: The openerMethod config option must by "popup" or "modal".', editor );
+			throw new CKEditorError( 'ckfinder-unknown-openermethod', editor );
 		}
 
 		const options = this.editor.config.get( 'ckfinder.options' ) || {};

+ 1 - 1
packages/ckeditor5-core/src/commandcollection.js

@@ -63,7 +63,7 @@ export default class CommandCollection {
 			 * @error commandcollection-command-not-found
 			 * @param {String} commandName Name of the command.
 			 */
-			throw new CKEditorError( 'commandcollection-command-not-found: Command does not exist.', this, { commandName } );
+			throw new CKEditorError( 'commandcollection-command-not-found', this, { commandName } );
 		}
 
 		return command.execute( ...args );

+ 3 - 3
packages/ckeditor5-core/src/context.js

@@ -125,7 +125,7 @@ export default class Context {
 				 * @error context-initplugins-constructor-only
 				 */
 				throw new CKEditorError(
-					'context-initplugins-constructor-only: Only a constructor function is allowed as a context plugin.',
+					'context-initplugins-constructor-only',
 					null,
 					{ Plugin }
 				);
@@ -139,7 +139,7 @@ export default class Context {
 				 * @error context-initplugins-invalid-plugin
 				 */
 				throw new CKEditorError(
-					'context-initplugins-invalid-plugin: Only a plugin marked as a context plugin is allowed to be used with a context.',
+					'context-initplugins-invalid-plugin',
 					null,
 					{ Plugin }
 				);
@@ -180,7 +180,7 @@ export default class Context {
 			 * @error context-addEditor-private-context
 			 */
 			throw new CKEditorError(
-				'context-addEditor-private-context: Cannot add multiple editors to the context which is created by the editor.'
+				'context-addeditor-private-context'
 			);
 		}
 

+ 1 - 1
packages/ckeditor5-core/src/editor/utils/attachtoform.js

@@ -27,7 +27,7 @@ export default function attachToForm( editor ) {
 		 * @error attachtoform-missing-elementapi-interface
 		 */
 		throw new CKEditorError(
-			'attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.',
+			'attachtoform-missing-elementapi-interface',
 			editor
 		);
 	}

+ 1 - 1
packages/ckeditor5-core/src/editor/utils/elementapimixin.js

@@ -31,7 +31,7 @@ const ElementApiMixin = {
 			 * @error editor-missing-sourceelement
 			 */
 			throw new CKEditorError(
-				'editor-missing-sourceelement: Cannot update the source element of a detached editor.',
+				'editor-missing-sourceelement',
 				this
 			);
 		}

+ 1 - 2
packages/ckeditor5-core/src/editor/utils/securesourceelement.js

@@ -36,8 +36,7 @@ export default function secureSourceElement( editor ) {
 		 * @param {HTMLElement} element DOM element that caused the collision.
 		 */
 		throw new CKEditorError(
-			'editor-source-element-already-used: ' +
-			'The DOM element cannot be used to create multiple editor instances.',
+			'editor-source-element-already-used',
 			editor
 		);
 	}

+ 1 - 1
packages/ckeditor5-core/src/pendingactions.js

@@ -99,7 +99,7 @@ export default class PendingActions extends ContextPlugin {
 			 *
 			 * @error pendingactions-add-invalid-message
 			 */
-			throw new CKEditorError( 'pendingactions-add-invalid-message: The message must be a string.', this );
+			throw new CKEditorError( 'pendingactions-add-invalid-message', this );
 		}
 
 		const action = Object.create( ObservableMixin );

+ 3 - 4
packages/ckeditor5-core/src/plugincollection.js

@@ -295,7 +295,7 @@ export default class PluginCollection {
 							 * @param {String} requiredBy The name of the parent plugin.
 							 */
 							throw new CKEditorError(
-								'plugincollection-context-required: Context plugin can not require plugin which is not a context plugin',
+								'plugincollection-context-required',
 								null,
 								{ plugin: RequiredPluginConstructor.name, requiredBy: PluginConstructor.name }
 							);
@@ -310,8 +310,7 @@ export default class PluginCollection {
 							 * @param {String} requiredBy The name of the parent plugin.
 							 */
 							throw new CKEditorError(
-								'plugincollection-required: Cannot load a plugin because one of its dependencies is listed in' +
-								'the `removePlugins` option.',
+								'plugincollection-required',
 								context,
 								{ plugin: RequiredPluginConstructor.name, requiredBy: PluginConstructor.name }
 							);
@@ -421,7 +420,7 @@ export default class PluginCollection {
 			 * @param {Function} plugin2 The second plugin constructor.
 			 */
 			throw new CKEditorError(
-				'plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',
+				'plugincollection-plugin-name-conflict',
 				null,
 				{ pluginName, plugin1: this._plugins.get( pluginName ).constructor, plugin2: PluginConstructor }
 			);

+ 1 - 2
packages/ckeditor5-core/tests/_utils/classictesteditor.js

@@ -78,8 +78,7 @@ export default class ClassicTestEditor extends Editor {
 						if ( !isElement( sourceElementOrData ) && config.initialData ) {
 							// Documented in core/editor/editorconfig.jsdoc.
 							throw new CKEditorError(
-								'editor-create-initial-data: ' +
-								'The config.initialData option cannot be used together with initial data passed in Editor.create().',
+								'editor-create-initial-data',
 								null
 							);
 						}

+ 2 - 3
packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -204,7 +204,7 @@ export default class BalloonEditor extends Editor {
 			if ( isHTMLElement && sourceElementOrData.tagName === 'TEXTAREA' ) {
 				// Documented in core/editor/editor.js
 				throw new CKEditorError(
-					'editor-wrong-element: This type of editor cannot be initialized inside <textarea> element.',
+					'editor-wrong-element',
 					null
 				);
 			}
@@ -220,8 +220,7 @@ export default class BalloonEditor extends Editor {
 						if ( !isHTMLElement && config.initialData ) {
 							// Documented in core/editor/editorconfig.jdoc.
 							throw new CKEditorError(
-								'editor-create-initial-data: ' +
-								'The config.initialData option cannot be used together with initial data passed in Editor.create().',
+								'editor-create-initial-data',
 								null
 							);
 						}

+ 1 - 2
packages/ckeditor5-editor-classic/src/classiceditor.js

@@ -201,8 +201,7 @@ export default class ClassicEditor extends Editor {
 						if ( !isElement( sourceElementOrData ) && config.initialData ) {
 							// Documented in core/editor/editorconfig.jdoc.
 							throw new CKEditorError(
-								'editor-create-initial-data: ' +
-								'The config.initialData option cannot be used together with initial data passed in Editor.create().',
+								'editor-create-initial-data',
 								null
 							);
 						}

+ 2 - 3
packages/ckeditor5-editor-decoupled/src/decouplededitor.js

@@ -227,7 +227,7 @@ export default class DecoupledEditor extends Editor {
 			if ( isHTMLElement && sourceElementOrData.tagName === 'TEXTAREA' ) {
 				// Documented in core/editor/editor.js
 				throw new CKEditorError(
-					'editor-wrong-element: This type of editor cannot be initialized inside <textarea> element.', null );
+					'editor-wrong-element', null );
 			}
 
 			const editor = new this( sourceElementOrData, config );
@@ -241,8 +241,7 @@ export default class DecoupledEditor extends Editor {
 						if ( !isHTMLElement && config.initialData ) {
 							// Documented in core/editor/editorconfig.jdoc.
 							throw new CKEditorError(
-								'editor-create-initial-data: ' +
-								'The config.initialData option cannot be used together with initial data passed in Editor.create().',
+								'editor-create-initial-data',
 								null
 							);
 						}

+ 2 - 3
packages/ckeditor5-editor-inline/src/inlineeditor.js

@@ -200,7 +200,7 @@ export default class InlineEditor extends Editor {
 			if ( isHTMLElement && sourceElementOrData.tagName === 'TEXTAREA' ) {
 				// Documented in core/editor/editor.js
 				throw new CKEditorError(
-					'editor-wrong-element: This type of editor cannot be initialized inside <textarea> element.', null );
+					'editor-wrong-element', null );
 			}
 
 			const editor = new this( sourceElementOrData, config );
@@ -214,8 +214,7 @@ export default class InlineEditor extends Editor {
 						if ( !isHTMLElement && config.initialData ) {
 							// Documented in core/editor/editorconfig.jdoc.
 							throw new CKEditorError(
-								'editor-create-initial-data: ' +
-								'The config.initialData option cannot be used together with initial data passed in Editor.create().',
+								'editor-create-initial-data',
 								null
 							);
 						}

+ 4 - 4
packages/ckeditor5-engine/src/controller/datacontroller.js

@@ -176,7 +176,7 @@ export default class DataController {
 			 *
 			 * @error datacontroller-get-non-existent-root
 			 */
-			throw new CKEditorError( 'datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.', this );
+			throw new CKEditorError( 'datacontroller-get-non-existent-root', this );
 		}
 
 		const root = this.model.document.getRoot( rootName );
@@ -283,7 +283,7 @@ export default class DataController {
 			 *
 			 * @error datacontroller-init-document-not-empty
 			 */
-			throw new CKEditorError( 'datacontroller-init-document-not-empty: Trying to set initial data to not empty document.', this );
+			throw new CKEditorError( 'datacontroller-init-document-not-empty', this );
 		}
 
 		let initialData = {};
@@ -305,7 +305,7 @@ export default class DataController {
 			 *
 			 * @error datacontroller-init-non-existent-root
 			 */
-			throw new CKEditorError( 'datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.', this );
+			throw new CKEditorError( 'datacontroller-init-non-existent-root', this );
 		}
 
 		this.model.enqueueChange( 'transparent', writer => {
@@ -360,7 +360,7 @@ export default class DataController {
 			 *
 			 * @error datacontroller-set-non-existent-root
 			 */
-			throw new CKEditorError( 'datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.', this );
+			throw new CKEditorError( 'datacontroller-set-non-existent-root', this );
 		}
 
 		this.model.enqueueChange( 'transparent', writer => {

+ 3 - 4
packages/ckeditor5-engine/src/conversion/conversion.js

@@ -106,8 +106,7 @@ export default class Conversion {
 			 * @error conversion-add-alias-dispatcher-not-registered
 			 */
 			throw new CKEditorError(
-				'conversion-add-alias-dispatcher-not-registered: ' +
-				'Trying to register and alias for a dispatcher that nas not been registered.',
+				'conversion-add-alias-dispatcher-not-registered',
 				this
 			);
 		}
@@ -183,7 +182,7 @@ export default class Conversion {
 			 *
 			 * @error conversion-for-unknown-group
 			 */
-			throw new CKEditorError( 'conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.', this );
+			throw new CKEditorError( 'conversion-for-unknown-group', this );
 		}
 
 		return this._helpers.get( groupName );
@@ -588,7 +587,7 @@ export default class Conversion {
 			 *
 			 * @error conversion-group-exists
 			 */
-			throw new CKEditorError( 'conversion-group-exists: Trying to register a group name that has already been registered.', this );
+			throw new CKEditorError( 'conversion-group-exists', this );
 		}
 
 		const helpers = isDowncast ? new DowncastHelpers( dispatchers ) : new UpcastHelpers( dispatchers );

+ 1 - 2
packages/ckeditor5-engine/src/conversion/downcasthelpers.js

@@ -1107,8 +1107,7 @@ function changeAttribute( attributeCreator ) {
 			 * @error conversion-attribute-to-attribute-on-text
 			 */
 			throw new CKEditorError(
-				'conversion-attribute-to-attribute-on-text: ' +
-				'Trying to convert text node\'s attribute with attribute-to-attribute converter.',
+				'conversion-attribute-to-attribute-on-text',
 				[ data, conversionApi ]
 			);
 		}

+ 1 - 1
packages/ckeditor5-engine/src/conversion/upcastdispatcher.js

@@ -262,7 +262,7 @@ export default class UpcastDispatcher {
 			 *
 			 * @error view-conversion-dispatcher-incorrect-result
 			 */
-			throw new CKEditorError( 'view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.', this );
+			throw new CKEditorError( 'view-conversion-dispatcher-incorrect-result', this );
 		}
 
 		return { modelRange: data.modelRange, modelCursor: data.modelCursor };

+ 1 - 1
packages/ckeditor5-engine/src/conversion/viewconsumable.js

@@ -513,7 +513,7 @@ class ViewElementConsumables {
 				 *
 				 * @error viewconsumable-invalid-attribute
 				 */
-				throw new CKEditorError( 'viewconsumable-invalid-attribute: Classes and styles should be handled separately.', this );
+				throw new CKEditorError( 'viewconsumable-invalid-attribute', this );
 			}
 
 			consumables.set( name, true );

+ 2 - 2
packages/ckeditor5-engine/src/model/document.js

@@ -127,7 +127,7 @@ export default class Document {
 				 * @param {module:engine/model/operation/operation~Operation} operation
 				 */
 				throw new CKEditorError(
-					'model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',
+					'model-document-applyoperation-wrong-version',
 					this,
 					{ operation }
 				);
@@ -202,7 +202,7 @@ export default class Document {
 			 * @param {String} name
 			 */
 			throw new CKEditorError(
-				'model-document-createRoot-name-exists: Root with specified name already exists.',
+				'model-document-createroot-name-exists',
 				this,
 				{ name: rootName }
 			);

+ 2 - 2
packages/ckeditor5-engine/src/model/documentselection.js

@@ -653,7 +653,7 @@ class LiveSelection extends Selection {
 					 * @param {module:engine/model/range~Range} range
 					 */
 					throw new CKEditorError(
-						'document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',
+						'document-selection-wrong-position',
 						this,
 						{ range }
 					);
@@ -784,7 +784,7 @@ class LiveSelection extends Selection {
 			 * {@link module:engine/model/documentselection~DocumentSelection#_overrideGravity}.
 			 */
 			throw new CKEditorError(
-				'document-selection-gravity-wrong-restore: Attempting to restore the selection gravity for an unknown UID.',
+				'document-selection-gravity-wrong-restore',
 				this,
 				{ uid }
 			);

+ 1 - 1
packages/ckeditor5-engine/src/model/liveposition.js

@@ -46,7 +46,7 @@ export default class LivePosition extends Position {
 			 * @error liveposition-root-not-rootelement
 			 */
 			throw new CKEditorError(
-				'model-liveposition-root-not-rootelement: LivePosition\'s root has to be an instance of RootElement.',
+				'model-liveposition-root-not-rootelement',
 				root
 			);
 		}

+ 7 - 7
packages/ckeditor5-engine/src/model/markercollection.js

@@ -99,7 +99,7 @@ export default class MarkerCollection {
 			 *
 			 * @error markercollection-incorrect-marker-name
 			 */
-			throw new CKEditorError( 'markercollection-incorrect-marker-name: Marker name cannot contain the "," character.', this );
+			throw new CKEditorError( 'markercollection-incorrect-marker-name', this );
 		}
 
 		const oldMarker = this._markers.get( markerName );
@@ -177,7 +177,7 @@ export default class MarkerCollection {
 		const marker = this._markers.get( markerName );
 
 		if ( !marker ) {
-			throw new CKEditorError( 'markercollection-refresh-marker-not-exists: Marker with provided name does not exists.', this );
+			throw new CKEditorError( 'markercollection-refresh-marker-not-exists', this );
 		}
 
 		const range = marker.getRange();
@@ -393,7 +393,7 @@ class Marker {
 	 */
 	get managedUsingOperations() {
 		if ( !this._liveRange ) {
-			throw new CKEditorError( 'marker-destroyed: Cannot use a destroyed marker instance.', this );
+			throw new CKEditorError( 'marker-destroyed', this );
 		}
 
 		return this._managedUsingOperations;
@@ -406,7 +406,7 @@ class Marker {
 	 */
 	get affectsData() {
 		if ( !this._liveRange ) {
-			throw new CKEditorError( 'marker-destroyed: Cannot use a destroyed marker instance.', this );
+			throw new CKEditorError( 'marker-destroyed', this );
 		}
 
 		return this._affectsData;
@@ -419,7 +419,7 @@ class Marker {
 	 */
 	getStart() {
 		if ( !this._liveRange ) {
-			throw new CKEditorError( 'marker-destroyed: Cannot use a destroyed marker instance.', this );
+			throw new CKEditorError( 'marker-destroyed', this );
 		}
 
 		return this._liveRange.start.clone();
@@ -432,7 +432,7 @@ class Marker {
 	 */
 	getEnd() {
 		if ( !this._liveRange ) {
-			throw new CKEditorError( 'marker-destroyed: Cannot use a destroyed marker instance.', this );
+			throw new CKEditorError( 'marker-destroyed', this );
 		}
 
 		return this._liveRange.end.clone();
@@ -452,7 +452,7 @@ class Marker {
 	 */
 	getRange() {
 		if ( !this._liveRange ) {
-			throw new CKEditorError( 'marker-destroyed: Cannot use a destroyed marker instance.', this );
+			throw new CKEditorError( 'marker-destroyed', this );
 		}
 
 		return this._liveRange.toRange();

+ 2 - 2
packages/ckeditor5-engine/src/model/node.js

@@ -87,7 +87,7 @@ export default class Node {
 		}
 
 		if ( ( pos = this.parent.getChildIndex( this ) ) === null ) {
-			throw new CKEditorError( 'model-node-not-found-in-parent: The node\'s parent does not contain this node.', this );
+			throw new CKEditorError( 'model-node-not-found-in-parent', this );
 		}
 
 		return pos;
@@ -111,7 +111,7 @@ export default class Node {
 		}
 
 		if ( ( pos = this.parent.getChildStartOffset( this ) ) === null ) {
-			throw new CKEditorError( 'model-node-not-found-in-parent: The node\'s parent does not contain this node.', this );
+			throw new CKEditorError( 'model-node-not-found-in-parent', this );
 		}
 
 		return pos;

+ 3 - 3
packages/ckeditor5-engine/src/model/nodelist.js

@@ -124,7 +124,7 @@ export default class NodeList {
 			 *
 			 * @error nodelist-index-out-of-bounds
 			 */
-			throw new CKEditorError( 'model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.', this );
+			throw new CKEditorError( 'model-nodelist-index-out-of-bounds', this );
 		}
 
 		return this.getNodeStartOffset( node );
@@ -158,7 +158,7 @@ export default class NodeList {
 			 * @param {Number} offset
 			 * @param {module:engine/model/nodelist~NodeList} nodeList Stringified node list.
 			 */
-			throw new CKEditorError( 'model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list.',
+			throw new CKEditorError( 'model-nodelist-offset-out-of-bounds',
 				this,
 				{
 					offset,
@@ -187,7 +187,7 @@ export default class NodeList {
 				 * @error nodelist-insertNodes-not-node
 				 */
 				throw new CKEditorError(
-					'model-nodelist-insertNodes-not-node: Trying to insert an object which is not a Node instance.',
+					'model-nodelist-insertnodes-not-node',
 					this
 				);
 			}

+ 3 - 4
packages/ckeditor5-engine/src/model/operation/attributeoperation.js

@@ -128,7 +128,7 @@ export default class AttributeOperation extends Operation {
 			 *
 			 * @error attribute-operation-range-not-flat
 			 */
-			throw new CKEditorError( 'attribute-operation-range-not-flat: The range to change is not flat.', this );
+			throw new CKEditorError( 'attribute-operation-range-not-flat', this );
 		}
 
 		for ( const item of this.range.getItems( { shallow: true } ) ) {
@@ -142,8 +142,7 @@ export default class AttributeOperation extends Operation {
 				 * @param {*} value
 				 */
 				throw new CKEditorError(
-					'attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s ' +
-					'old attribute value.',
+					'attribute-operation-wrong-old-value',
 					this,
 					{ item, key: this.key, value: this.oldValue }
 				);
@@ -158,7 +157,7 @@ export default class AttributeOperation extends Operation {
 				 * @param {String} key
 				 */
 				throw new CKEditorError(
-					'attribute-operation-attribute-exists: The attribute with given key already exists.',
+					'attribute-operation-attribute-exists',
 					this,
 					{ node: item, key: this.key }
 				);

+ 1 - 1
packages/ckeditor5-engine/src/model/operation/detachoperation.js

@@ -75,7 +75,7 @@ export default class DetachOperation extends Operation {
 			 *
 			 * @error detach-operation-on-document-node
 			 */
-			throw new CKEditorError( 'detach-operation-on-document-node: Cannot detach document node.', this );
+			throw new CKEditorError( 'detach-operation-on-document-node', this );
 		}
 	}
 

+ 1 - 1
packages/ckeditor5-engine/src/model/operation/insertoperation.js

@@ -115,7 +115,7 @@ export default class InsertOperation extends Operation {
 			 * @error insert-operation-position-invalid
 			 */
 			throw new CKEditorError(
-				'insert-operation-position-invalid: Insertion position is invalid.',
+				'insert-operation-position-invalid',
 				this
 			);
 		}

+ 3 - 3
packages/ckeditor5-engine/src/model/operation/mergeoperation.js

@@ -147,21 +147,21 @@ export default class MergeOperation extends Operation {
 			 *
 			 * @error merge-operation-source-position-invalid
 			 */
-			throw new CKEditorError( 'merge-operation-source-position-invalid: Merge source position is invalid.', this );
+			throw new CKEditorError( 'merge-operation-source-position-invalid', this );
 		} else if ( !targetElement.parent ) {
 			/**
 			 * Merge target position is invalid. The element to be merged must have a parent node.
 			 *
 			 * @error merge-operation-target-position-invalid
 			 */
-			throw new CKEditorError( 'merge-operation-target-position-invalid: Merge target position is invalid.', this );
+			throw new CKEditorError( 'merge-operation-target-position-invalid', this );
 		} else if ( this.howMany != sourceElement.maxOffset ) {
 			/**
 			 * Merge operation specifies wrong number of nodes to move.
 			 *
 			 * @error merge-operation-how-many-invalid
 			 */
-			throw new CKEditorError( 'merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.', this );
+			throw new CKEditorError( 'merge-operation-how-many-invalid', this );
 		}
 	}
 

+ 3 - 3
packages/ckeditor5-engine/src/model/operation/moveoperation.js

@@ -132,7 +132,7 @@ export default class MoveOperation extends Operation {
 			 * @error move-operation-nodes-do-not-exist
 			 */
 			throw new CKEditorError(
-				'move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.', this
+				'move-operation-nodes-do-not-exist', this
 			);
 		} else if ( sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany ) {
 			/**
@@ -141,7 +141,7 @@ export default class MoveOperation extends Operation {
 			 * @error move-operation-range-into-itself
 			 */
 			throw new CKEditorError(
-				'move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.', this
+				'move-operation-range-into-itself', this
 			);
 		} else if ( this.sourcePosition.root == this.targetPosition.root ) {
 			if ( compareArrays( this.sourcePosition.getParentPath(), this.targetPosition.getParentPath() ) == 'prefix' ) {
@@ -154,7 +154,7 @@ export default class MoveOperation extends Operation {
 					 * @error move-operation-node-into-itself
 					 */
 					throw new CKEditorError(
-						'move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.', this
+						'move-operation-node-into-itself', this
 					);
 				}
 			}

+ 2 - 2
packages/ckeditor5-engine/src/model/operation/renameoperation.js

@@ -94,7 +94,7 @@ export default class RenameOperation extends Operation {
 			 * @error rename-operation-wrong-position
 			 */
 			throw new CKEditorError(
-				'rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.',
+				'rename-operation-wrong-position',
 				this
 			);
 		} else if ( element.name !== this.oldName ) {
@@ -104,7 +104,7 @@ export default class RenameOperation extends Operation {
 			 * @error rename-operation-wrong-name
 			 */
 			throw new CKEditorError(
-				'rename-operation-wrong-name: Element to change has different name than operation\'s old name.',
+				'rename-operation-wrong-name',
 				this
 			);
 		}

+ 4 - 5
packages/ckeditor5-engine/src/model/operation/rootattributeoperation.js

@@ -115,7 +115,7 @@ export default class RootAttributeOperation extends Operation {
 			 * @param {*} value
 			 */
 			throw new CKEditorError(
-				'rootattribute-operation-not-a-root: The element to change is not a root element.',
+				'rootattribute-operation-not-a-root',
 				this,
 				{ root: this.root, key: this.key }
 			);
@@ -131,8 +131,7 @@ export default class RootAttributeOperation extends Operation {
 			 * @param {*} value
 			 */
 			throw new CKEditorError(
-				'rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s ' +
-				'old attribute value.',
+				'rootattribute-operation-wrong-old-value',
 				this,
 				{ root: this.root, key: this.key }
 			);
@@ -147,7 +146,7 @@ export default class RootAttributeOperation extends Operation {
 			 * @param {String} key
 			 */
 			throw new CKEditorError(
-				'rootattribute-operation-attribute-exists: The attribute with given key already exists.',
+				'rootattribute-operation-attribute-exists',
 				this,
 				{ root: this.root, key: this.key }
 			);
@@ -199,7 +198,7 @@ export default class RootAttributeOperation extends Operation {
 			 * @param {String} rootName
 			 */
 			throw new CKEditorError(
-				'rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',
+				'rootattribute-operation-fromjson-no-root',
 				this,
 				{ rootName: json.root }
 			);

+ 4 - 4
packages/ckeditor5-engine/src/model/operation/splitoperation.js

@@ -149,28 +149,28 @@ export default class SplitOperation extends Operation {
 			 *
 			 * @error split-operation-position-invalid
 			 */
-			throw new CKEditorError( 'split-operation-position-invalid: Split position is invalid.', this );
+			throw new CKEditorError( 'split-operation-position-invalid', this );
 		} else if ( !element.parent ) {
 			/**
 			 * Cannot split root element.
 			 *
 			 * @error split-operation-split-in-root
 			 */
-			throw new CKEditorError( 'split-operation-split-in-root: Cannot split root element.', this );
+			throw new CKEditorError( 'split-operation-split-in-root', this );
 		} else if ( this.howMany != element.maxOffset - this.splitPosition.offset ) {
 			/**
 			 * Split operation specifies wrong number of nodes to move.
 			 *
 			 * @error split-operation-how-many-invalid
 			 */
-			throw new CKEditorError( 'split-operation-how-many-invalid: Split operation specifies wrong number of nodes to move.', this );
+			throw new CKEditorError( 'split-operation-how-many-invalid', this );
 		} else if ( this.graveyardPosition && !this.graveyardPosition.nodeAfter ) {
 			/**
 			 * Graveyard position invalid.
 			 *
 			 * @error split-operation-graveyard-position-invalid
 			 */
-			throw new CKEditorError( 'split-operation-graveyard-position-invalid: Graveyard position invalid.', this );
+			throw new CKEditorError( 'split-operation-graveyard-position-invalid', this );
 		}
 	}
 

+ 2 - 4
packages/ckeditor5-engine/src/model/operation/utils.js

@@ -70,8 +70,7 @@ export function _remove( range ) {
 		 * @error operation-utils-remove-range-not-flat
 		 */
 		throw new CKEditorError(
-			'operation-utils-remove-range-not-flat: ' +
-			'Trying to remove a range which starts and ends in different element.',
+			'operation-utils-remove-range-not-flat',
 			this
 		);
 	}
@@ -109,8 +108,7 @@ export function _move( sourceRange, targetPosition ) {
 		 * @error operation-utils-move-range-not-flat
 		 */
 		throw new CKEditorError(
-			'operation-utils-move-range-not-flat: ' +
-			'Trying to move a range which starts and ends in different element.',
+			'operation-utils-move-range-not-flat',
 			this
 		);
 	}

+ 9 - 10
packages/ckeditor5-engine/src/model/position.js

@@ -60,7 +60,7 @@ export default class Position {
 			 * @error model-position-root-invalid
 			 */
 			throw new CKEditorError(
-				'model-position-root-invalid: Position root invalid.',
+				'model-position-root-invalid',
 				root
 			);
 		}
@@ -73,7 +73,7 @@ export default class Position {
 			 * @param path
 			 */
 			throw new CKEditorError(
-				'model-position-path-incorrect-format: Position path must be an array with at least one item.',
+				'model-position-path-incorrect-format',
 				root,
 				{ path }
 			);
@@ -169,7 +169,7 @@ export default class Position {
 			parent = parent.getChild( parent.offsetToIndex( this.path[ i ] ) );
 
 			if ( !parent ) {
-				throw new CKEditorError( 'model-position-path-incorrect: The position\'s path is incorrect.', this, { position: this } );
+				throw new CKEditorError( 'model-position-path-incorrect', this, { position: this } );
 			}
 		}
 
@@ -189,7 +189,7 @@ export default class Position {
 			 * @error position-incorrect-path
 			 * @param {module:engine/model/position~Position} position The incorrect position.
 			 */
-			throw new CKEditorError( 'model-position-path-incorrect: The position\'s path is incorrect.', this, { position: this } );
+			throw new CKEditorError( 'model-position-path-incorrect', this, { position: this } );
 		}
 
 		return parent;
@@ -926,8 +926,7 @@ export default class Position {
 				 * @error model-createPositionAt-offset-required
 				 */
 				throw new CKEditorError(
-					'model-createPositionAt-offset-required: ' +
-					'Model#createPositionAt() requires the offset when the first parameter is a model item.',
+					'model-createpositionat-offset-required',
 					[ this, itemOrPosition ]
 				);
 			}
@@ -939,7 +938,7 @@ export default class Position {
 				 * @error model-position-parent-incorrect
 				 */
 				throw new CKEditorError(
-					'model-position-parent-incorrect: Position parent have to be a element or document fragment.',
+					'model-position-parent-incorrect',
 					[ this, itemOrPosition ]
 				);
 			}
@@ -969,7 +968,7 @@ export default class Position {
 			 * @param {module:engine/model/item~Item} root
 			 */
 			throw new CKEditorError(
-				'model-position-after-root: You cannot make a position after root.',
+				'model-position-after-root',
 				[ this, item ],
 				{ root: item }
 			);
@@ -995,7 +994,7 @@ export default class Position {
 			 * @param {module:engine/model/item~Item} root
 			 */
 			throw new CKEditorError(
-				'model-position-before-root: You cannot make a position before root.',
+				'model-position-before-root',
 				item,
 				{ root: item }
 			);
@@ -1027,7 +1026,7 @@ export default class Position {
 			 * @param {String} rootName
 			 */
 			throw new CKEditorError(
-				'model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.',
+				'model-position-fromjson-no-root',
 				doc,
 				{ rootName: json.root }
 			);

+ 1 - 1
packages/ckeditor5-engine/src/model/range.js

@@ -974,7 +974,7 @@ export default class Range {
 			 * @error range-create-from-ranges-empty-array
 			 */
 			throw new CKEditorError(
-				'range-create-from-ranges-empty-array: At least one range has to be passed.',
+				'range-create-from-ranges-empty-array',
 				null
 			);
 		} else if ( ranges.length == 1 ) {

+ 4 - 4
packages/ckeditor5-engine/src/model/schema.js

@@ -92,7 +92,7 @@ export default class Schema {
 			 * @error schema-cannot-register-item-twice
 			 */
 			throw new CKEditorError(
-				'schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.',
+				'schema-cannot-register-item-twice',
 				this,
 				{
 					itemName
@@ -142,7 +142,7 @@ export default class Schema {
 			 * @param itemName The name of the model element which is being extended.
 			 * @error schema-cannot-extend-missing-item
 			 */
-			throw new CKEditorError( 'schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.', this, {
+			throw new CKEditorError( 'schema-cannot-extend-missing-item', this, {
 				itemName
 			} );
 		}
@@ -447,7 +447,7 @@ export default class Schema {
 				 * @error schema-check-merge-no-element-before
 				 */
 				throw new CKEditorError(
-					'schema-check-merge-no-element-before: The node before the merge position must be an element.',
+					'schema-check-merge-no-element-before',
 					this
 				);
 			}
@@ -459,7 +459,7 @@ export default class Schema {
 				 * @error schema-check-merge-no-element-after
 				 */
 				throw new CKEditorError(
-					'schema-check-merge-no-element-after: The node after the merge position must be an element.',
+					'schema-check-merge-no-element-after',
 					this
 				);
 			}

+ 5 - 7
packages/ckeditor5-engine/src/model/selection.js

@@ -393,8 +393,7 @@ export default class Selection {
 				 * @error model-selection-setTo-required-second-parameter
 				 */
 				throw new CKEditorError(
-					'model-selection-setTo-required-second-parameter: ' +
-					'selection.setTo requires the second parameter when the first parameter is a node.',
+					'model-selection-setto-required-second-parameter',
 					[ this, selectable ]
 				);
 			}
@@ -417,7 +416,7 @@ export default class Selection {
 			 * @error model-selection-setTo-not-selectable
 			 */
 			throw new CKEditorError(
-				'model-selection-setTo-not-selectable: Cannot set the selection to the given place.',
+				'model-selection-setto-not-selectable',
 				[ this, selectable ]
 			);
 		}
@@ -452,8 +451,7 @@ export default class Selection {
 				 * @error model-selection-set-ranges-not-range
 				 */
 				throw new CKEditorError(
-					'model-selection-set-ranges-not-range: ' +
-					'Selection range set to an object that is not an instance of model.Range.',
+					'model-selection-set-ranges-not-range',
 					[ this, newRanges ]
 				);
 			}
@@ -498,7 +496,7 @@ export default class Selection {
 			 * @error model-selection-setFocus-no-ranges
 			 */
 			throw new CKEditorError(
-				'model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.',
+				'model-selection-setfocus-no-ranges',
 				[ this, itemOrPosition ]
 			);
 		}
@@ -756,7 +754,7 @@ export default class Selection {
 				 * @param {module:engine/model/range~Range} intersectingRange Range in the selection that intersects with `addedRange`.
 				 */
 				throw new CKEditorError(
-					'model-selection-range-intersects: Trying to add a range that intersects with another range in the selection.',
+					'model-selection-range-intersects',
 					[ this, range ],
 					{ addedRange: range, intersectingRange: this._ranges[ i ] }
 				);

+ 2 - 2
packages/ckeditor5-engine/src/model/textproxy.js

@@ -66,7 +66,7 @@ export default class TextProxy {
 			 *
 			 * @error model-textproxy-wrong-offsetintext
 			 */
-			throw new CKEditorError( 'model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.', this );
+			throw new CKEditorError( 'model-textproxy-wrong-offsetintext', this );
 		}
 
 		if ( length < 0 || offsetInText + length > textNode.offsetSize ) {
@@ -75,7 +75,7 @@ export default class TextProxy {
 			 *
 			 * @error model-textproxy-wrong-length
 			 */
-			throw new CKEditorError( 'model-textproxy-wrong-length: Given length value is incorrect.', this );
+			throw new CKEditorError( 'model-textproxy-wrong-length', this );
 		}
 
 		/**

+ 2 - 2
packages/ckeditor5-engine/src/model/treewalker.js

@@ -48,7 +48,7 @@ export default class TreeWalker {
 			 * @error model-tree-walker-no-start-position
 			 */
 			throw new CKEditorError(
-				'model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.',
+				'model-tree-walker-no-start-position',
 				null
 			);
 		}
@@ -57,7 +57,7 @@ export default class TreeWalker {
 
 		if ( direction != 'forward' && direction != 'backward' ) {
 			throw new CKEditorError(
-				'model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',
+				'model-tree-walker-unknown-direction',
 				options,
 				{ direction }
 			);

+ 2 - 3
packages/ckeditor5-engine/src/model/utils/insertcontent.js

@@ -324,7 +324,7 @@ class Insertion {
 			 * @param {module:engine/model/position~Position} position Position to insert the node at.
 			 */
 			throw new CKEditorError(
-				'insertcontent-wrong-position: Given node cannot be inserted on the given position.',
+				'insertcontent-wrong-position',
 				this,
 				{ node, position: this.position }
 			);
@@ -452,8 +452,7 @@ class Insertion {
 				 *
 				 * @error insertcontent-invalid-insertion-position
 				 */
-				throw new CKEditorError( 'insertcontent-invalid-insertion-position: ' +
-					'An internal error occurred during insertContent().', this );
+				throw new CKEditorError( 'insertcontent-invalid-insertion-position', this );
 			}
 
 			// Move the position to the previous node, so it isn't moved to the graveyard on merge.

+ 20 - 22
packages/ckeditor5-engine/src/model/writer.js

@@ -196,9 +196,7 @@ export default class Writer {
 					 * @error model-writer-insert-forbidden-move
 					 */
 					throw new CKEditorError(
-						'model-writer-insert-forbidden-move: ' +
-						'Cannot move a node from a document to a different tree. ' +
-						'It is forbidden to move a node that was already in a document outside of it.',
+						'undefinedit-is-forbidden-to-move-a-node-that-was-already-in-a-document-outside-of-it.',
 						this
 					);
 				} else {
@@ -484,7 +482,7 @@ export default class Writer {
 			 *
 			 * @error writer-move-invalid-range
 			 */
-			throw new CKEditorError( 'writer-move-invalid-range: Invalid range to move.', this );
+			throw new CKEditorError( 'writer-move-invalid-range', this );
 		}
 
 		if ( !range.isFlat ) {
@@ -493,7 +491,7 @@ export default class Writer {
 			 *
 			 * @error writer-move-range-not-flat
 			 */
-			throw new CKEditorError( 'writer-move-range-not-flat: Range to move is not flat.', this );
+			throw new CKEditorError( 'writer-move-range-not-flat', this );
 		}
 
 		const position = Position._createAt( itemOrPosition, offset );
@@ -513,7 +511,7 @@ export default class Writer {
 			 *
 			 * @error writer-move-different-document
 			 */
-			throw new CKEditorError( 'writer-move-different-document: Range is going to be moved between different documents.', this );
+			throw new CKEditorError( 'writer-move-different-document', this );
 		}
 
 		const version = range.root.document ? range.root.document.version : null;
@@ -565,7 +563,7 @@ export default class Writer {
 			 *
 			 * @error writer-merge-no-element-before
 			 */
-			throw new CKEditorError( 'writer-merge-no-element-before: Node before merge position must be an element.', this );
+			throw new CKEditorError( 'writer-merge-no-element-before', this );
 		}
 
 		if ( !( nodeAfter instanceof Element ) ) {
@@ -574,7 +572,7 @@ export default class Writer {
 			 *
 			 * @error writer-merge-no-element-after
 			 */
-			throw new CKEditorError( 'writer-merge-no-element-after: Node after merge position must be an element.', this );
+			throw new CKEditorError( 'writer-merge-no-element-after', this );
 		}
 
 		if ( !position.root.document ) {
@@ -724,7 +722,7 @@ export default class Writer {
 			 * @error writer-rename-not-element-instance
 			 */
 			throw new CKEditorError(
-				'writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.',
+				'writer-rename-not-element-instance',
 				this
 			);
 		}
@@ -761,7 +759,7 @@ export default class Writer {
 			 *
 			 * @error writer-split-element-no-parent
 			 */
-			throw new CKEditorError( 'writer-split-element-no-parent: Element with no parent can not be split.', this );
+			throw new CKEditorError( 'writer-split-element-no-parent', this );
 		}
 
 		// When limit element is not defined lets set splitElement parent as limit.
@@ -770,7 +768,7 @@ export default class Writer {
 		}
 
 		if ( !position.parent.getAncestors( { includeSelf: true } ).includes( limitElement ) ) {
-			throw new CKEditorError( 'writer-split-invalid-limit-element: Limit element is not a position ancestor.', this );
+			throw new CKEditorError( 'writer-split-invalid-limit-element', this );
 		}
 
 		// We need to cache elements that will be created as a result of the first split because
@@ -820,7 +818,7 @@ export default class Writer {
 			 *
 			 * @error writer-wrap-range-not-flat
 			 */
-			throw new CKEditorError( 'writer-wrap-range-not-flat: Range to wrap is not flat.', this );
+			throw new CKEditorError( 'writer-wrap-range-not-flat', this );
 		}
 
 		const element = elementOrString instanceof Element ? elementOrString : new Element( elementOrString );
@@ -831,7 +829,7 @@ export default class Writer {
 			 *
 			 * @error writer-wrap-element-not-empty
 			 */
-			throw new CKEditorError( 'writer-wrap-element-not-empty: Element to wrap with is not empty.', this );
+			throw new CKEditorError( 'writer-wrap-element-not-empty', this );
 		}
 
 		if ( element.parent !== null ) {
@@ -840,7 +838,7 @@ export default class Writer {
 			 *
 			 * @error writer-wrap-element-attached
 			 */
-			throw new CKEditorError( 'writer-wrap-element-attached: Element to wrap with is already attached to tree model.', this );
+			throw new CKEditorError( 'writer-wrap-element-attached', this );
 		}
 
 		this.insert( element, range.start );
@@ -866,7 +864,7 @@ export default class Writer {
 			 *
 			 * @error writer-unwrap-element-no-parent
 			 */
-			throw new CKEditorError( 'writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.', this );
+			throw new CKEditorError( 'writer-unwrap-element-no-parent', this );
 		}
 
 		this.move( Range._createIn( element ), this.createPositionAfter( element ) );
@@ -922,7 +920,7 @@ export default class Writer {
 			 * @error writer-addMarker-no-usingOperation
 			 */
 			throw new CKEditorError(
-				'writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.',
+				'writer-addmarker-no-usingoperation',
 				this
 			);
 		}
@@ -937,7 +935,7 @@ export default class Writer {
 			 *
 			 * @error writer-addMarker-marker-exists
 			 */
-			throw new CKEditorError( 'writer-addMarker-marker-exists: Marker with provided name already exists.', this );
+			throw new CKEditorError( 'writer-addmarker-marker-exists', this );
 		}
 
 		if ( !range ) {
@@ -947,7 +945,7 @@ export default class Writer {
 			 * @error writer-addMarker-no-range
 			 */
 			throw new CKEditorError(
-				'writer-addMarker-no-range: Range parameter is required when adding a new marker.',
+				'writer-addmarker-no-range',
 				this
 			);
 		}
@@ -1042,7 +1040,7 @@ export default class Writer {
 			 *
 			 * @error writer-updateMarker-marker-not-exists
 			 */
-			throw new CKEditorError( 'writer-updateMarker-marker-not-exists: Marker with provided name does not exists.', this );
+			throw new CKEditorError( 'writer-updatemarker-marker-not-exists', this );
 		}
 
 		if ( !options ) {
@@ -1064,7 +1062,7 @@ export default class Writer {
 			 * @error writer-updateMarker-wrong-options
 			 */
 			throw new CKEditorError(
-				'writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.',
+				'writer-updatemarker-wrong-options',
 				this
 			);
 		}
@@ -1116,7 +1114,7 @@ export default class Writer {
 			 *
 			 * @error writer-removeMarker-no-marker
 			 */
-			throw new CKEditorError( 'writer-removeMarker-no-marker: Trying to remove marker which does not exist.', this );
+			throw new CKEditorError( 'writer-removemarker-no-marker', this );
 		}
 
 		const marker = this.model.markers.get( name );
@@ -1349,7 +1347,7 @@ export default class Writer {
 		 * @error writer-incorrect-use
 		 */
 		if ( this.model._currentWriter !== this ) {
-			throw new CKEditorError( 'writer-incorrect-use: Trying to use a writer outside the change() block.', this );
+			throw new CKEditorError( 'writer-incorrect-use', this );
 		}
 	}
 

+ 1 - 2
packages/ckeditor5-engine/src/view/attributeelement.js

@@ -120,8 +120,7 @@ export default class AttributeElement extends Element {
 			 * @error attribute-element-get-elements-with-same-id-no-id
 			 */
 			throw new CKEditorError(
-				'attribute-element-get-elements-with-same-id-no-id: ' +
-				'Cannot get elements with the same id for an attribute element without id.',
+				'attribute-element-get-elements-with-same-id-no-id',
 				this
 			);
 		}

+ 11 - 12
packages/ckeditor5-engine/src/view/downcastwriter.js

@@ -506,7 +506,7 @@ export default class DowncastWriter {
 			 * @error view-writer-break-non-container-element
 			 */
 			throw new CKEditorError(
-				'view-writer-break-non-container-element: Trying to break an element which is not a container element.',
+				'view-writer-break-non-container-element',
 				this.document
 			);
 		}
@@ -517,7 +517,7 @@ export default class DowncastWriter {
 			 *
 			 * @error view-writer-break-root
 			 */
-			throw new CKEditorError( 'view-writer-break-root: Trying to break root element.', this.document );
+			throw new CKEditorError( 'view-writer-break-root', this.document );
 		}
 
 		if ( position.isAtStart ) {
@@ -639,8 +639,7 @@ export default class DowncastWriter {
 			 *
 			 * @error view-writer-merge-containers-invalid-position
 			 */
-			throw new CKEditorError( 'view-writer-merge-containers-invalid-position: ' +
-				'Element before and after given position cannot be merged.', this.document );
+			throw new CKEditorError( 'view-writer-merge-containers-invalid-position', this.document );
 		}
 
 		const lastChild = prev.getChild( prev.childCount - 1 );
@@ -686,7 +685,7 @@ export default class DowncastWriter {
 			 * @error view-writer-invalid-position-container
 			 */
 			throw new CKEditorError(
-				'view-writer-invalid-position-container: Position\'s parent container cannot be found.',
+				'view-writer-invalid-position-container',
 				this.document
 			);
 		}
@@ -876,7 +875,7 @@ export default class DowncastWriter {
 	wrap( range, attribute ) {
 		if ( !( attribute instanceof AttributeElement ) ) {
 			throw new CKEditorError(
-				'view-writer-wrap-invalid-attribute: DowncastWriter#wrap() must be called with an attribute element.',
+				'view-writer-wrap-invalid-attribute',
 				this.document
 			);
 		}
@@ -925,7 +924,7 @@ export default class DowncastWriter {
 			 * @error view-writer-unwrap-invalid-attribute
 			 */
 			throw new CKEditorError(
-				'view-writer-unwrap-invalid-attribute: DowncastWriter#unwrap() must be called with an attribute element.',
+				'view-writer-unwrap-invalid-attribute',
 				this.document
 			);
 		}
@@ -1611,7 +1610,7 @@ export default class DowncastWriter {
 			 *
 			 * @error view-writer-cannot-break-empty-element
 			 */
-			throw new CKEditorError( 'view-writer-cannot-break-empty-element: Cannot break an EmptyElement instance.', this.document );
+			throw new CKEditorError( 'view-writer-cannot-break-empty-element', this.document );
 		}
 
 		// If position is placed inside UIElement - throw an exception as we cannot break inside.
@@ -1625,7 +1624,7 @@ export default class DowncastWriter {
 			 *
 			 * @error view-writer-cannot-break-ui-element
 			 */
-			throw new CKEditorError( 'view-writer-cannot-break-ui-element: Cannot break a UIElement instance.', this.document );
+			throw new CKEditorError( 'view-writer-cannot-break-ui-element', this.document );
 		}
 
 		// If position is placed inside RawElement - throw an exception as we cannot break inside.
@@ -1639,7 +1638,7 @@ export default class DowncastWriter {
 			 *
 			 * @error view-writer-cannot-break-raw-element
 			 */
-			throw new CKEditorError( 'view-writer-cannot-break-raw-element: Cannot break a RawElement instance.', this.document );
+			throw new CKEditorError( 'view-writer-cannot-break-raw-element', this.document );
 		}
 
 		// There are no attributes to break and text nodes breaking is not forced.
@@ -1942,7 +1941,7 @@ function validateNodesToInsert( nodes, errorContext ) {
 			 * @error view-writer-insert-invalid-node-type
 			 */
 			throw new CKEditorError(
-				'view-writer-insert-invalid-node-type: One of the nodes to be inserted is of invalid type.',
+				'view-writer-insert-invalid-node-type',
 				errorContext
 			);
 		}
@@ -1990,7 +1989,7 @@ function validateRangeContainer( range, errorContext ) {
 		 *
 		 * @error view-writer-invalid-range-container
 		 */
-		throw new CKEditorError( 'view-writer-invalid-range-container: The container of the given range is invalid.', errorContext );
+		throw new CKEditorError( 'view-writer-invalid-range-container', errorContext );
 	}
 }
 

+ 1 - 1
packages/ckeditor5-engine/src/view/emptyelement.js

@@ -101,7 +101,7 @@ export default class EmptyElement extends Element {
 			 * @error view-emptyelement-cannot-add
 			 */
 			throw new CKEditorError(
-				'view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.',
+				'view-emptyelement-cannot-add',
 				[ this, nodes ]
 			);
 		}

+ 1 - 1
packages/ckeditor5-engine/src/view/node.js

@@ -73,7 +73,7 @@ export default class Node {
 			 *
 			 * @error view-node-not-found-in-parent
 			 */
-			throw new CKEditorError( 'view-node-not-found-in-parent: The node\'s parent does not contain this node.', this );
+			throw new CKEditorError( 'view-node-not-found-in-parent', this );
 		}
 
 		return pos;

+ 3 - 4
packages/ckeditor5-engine/src/view/position.js

@@ -359,8 +359,7 @@ export default class Position {
 				 * @error view-createPositionAt-offset-required
 				 */
 				throw new CKEditorError(
-					'view-createPositionAt-offset-required: ' +
-					'View#createPositionAt() requires the offset when the first parameter is a view item.',
+					'view-createpositionat-offset-required',
 					node
 				);
 			}
@@ -389,7 +388,7 @@ export default class Position {
 			 * @error view-position-after-root
 			 * @param {module:engine/view/node~Node} root
 			 */
-			throw new CKEditorError( 'view-position-after-root: You can not make position after root.', item, { root: item } );
+			throw new CKEditorError( 'view-position-after-root', item, { root: item } );
 		}
 
 		return new Position( item.parent, item.index + 1 );
@@ -415,7 +414,7 @@ export default class Position {
 			 * @error view-position-before-root
 			 * @param {module:engine/view/node~Node} root
 			 */
-			throw new CKEditorError( 'view-position-before-root: You can not make position before root.', item, { root: item } );
+			throw new CKEditorError( 'view-position-before-root', item, { root: item } );
 		}
 
 		return new Position( item.parent, item.index );

+ 1 - 1
packages/ckeditor5-engine/src/view/rawelement.js

@@ -113,7 +113,7 @@ export default class RawElement extends Element {
 			 * @error view-rawelement-cannot-add
 			 */
 			throw new CKEditorError(
-				'view-rawelement-cannot-add: Cannot add child nodes to a RawElement instance.',
+				'view-rawelement-cannot-add',
 				[ this, nodes ]
 			);
 		}

+ 2 - 2
packages/ckeditor5-engine/src/view/renderer.js

@@ -152,7 +152,7 @@ export default class Renderer {
 				 *
 				 * @error renderer-unknown-type
 				 */
-				throw new CKEditorError( 'view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.', this );
+				throw new CKEditorError( 'view-renderer-unknown-type', this );
 			}
 		}
 	}
@@ -387,7 +387,7 @@ export default class Renderer {
 			 *
 			 * @error view-renderer-filler-was-lost
 			 */
-			throw new CKEditorError( 'view-renderer-filler-was-lost: The inline filler node was lost.', this );
+			throw new CKEditorError( 'view-renderer-filler-was-lost', this );
 		}
 
 		if ( isInlineFiller( domFillerNode ) ) {

+ 5 - 7
packages/ckeditor5-engine/src/view/selection.js

@@ -500,8 +500,7 @@ export default class Selection {
 				 * @error view-selection-setTo-required-second-parameter
 				 */
 				throw new CKEditorError(
-					'view-selection-setTo-required-second-parameter: ' +
-					'selection.setTo requires the second parameter when the first parameter is a node.',
+					'view-selection-setto-required-second-parameter',
 					this
 				);
 			} else if ( placeOrOffset == 'in' ) {
@@ -525,7 +524,7 @@ export default class Selection {
 			 *
 			 * @error view-selection-setTo-not-selectable
 			 */
-			throw new CKEditorError( 'view-selection-setTo-not-selectable: Cannot set selection to given place.', this );
+			throw new CKEditorError( 'view-selection-setto-not-selectable', this );
 		}
 
 		this.fire( 'change' );
@@ -550,7 +549,7 @@ export default class Selection {
 			 * @error view-selection-setFocus-no-ranges
 			 */
 			throw new CKEditorError(
-				'view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.',
+				'view-selection-setfocus-no-ranges',
 				this
 			);
 		}
@@ -660,8 +659,7 @@ export default class Selection {
 			 * @error view-selection-add-range-not-range
 			 */
 			throw new CKEditorError(
-				'view-selection-add-range-not-range: ' +
-				'Selection range set to an object that is not an instance of view.Range',
+				'view-selection-add-range-not-range',
 				this
 			);
 		}
@@ -690,7 +688,7 @@ export default class Selection {
 				 * @param {module:engine/view/range~Range} intersectingRange Range from selection that intersects with `addedRange`.
 				 */
 				throw new CKEditorError(
-					'view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',
+					'view-selection-range-intersects',
 					this,
 					{ addedRange: range, intersectingRange: storedRange }
 				);

+ 2 - 2
packages/ckeditor5-engine/src/view/textproxy.js

@@ -55,7 +55,7 @@ export default class TextProxy {
 			 *
 			 * @error view-textproxy-wrong-offsetintext
 			 */
-			throw new CKEditorError( 'view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.', this );
+			throw new CKEditorError( 'view-textproxy-wrong-offsetintext', this );
 		}
 
 		if ( length < 0 || offsetInText + length > textNode.data.length ) {
@@ -64,7 +64,7 @@ export default class TextProxy {
 			 *
 			 * @error view-textproxy-wrong-length
 			 */
-			throw new CKEditorError( 'view-textproxy-wrong-length: Given length value is incorrect.', this );
+			throw new CKEditorError( 'view-textproxy-wrong-length', this );
 		}
 
 		/**

+ 2 - 2
packages/ckeditor5-engine/src/view/treewalker.js

@@ -43,14 +43,14 @@ export default class TreeWalker {
 			 * @error view-tree-walker-no-start-position
 			 */
 			throw new CKEditorError(
-				'view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.',
+				'view-tree-walker-no-start-position',
 				null
 			);
 		}
 
 		if ( options.direction && options.direction != 'forward' && options.direction != 'backward' ) {
 			throw new CKEditorError(
-				'view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',
+				'view-tree-walker-unknown-direction',
 				options.startPosition,
 				{ direction: options.direction }
 			);

+ 1 - 1
packages/ckeditor5-engine/src/view/uielement.js

@@ -113,7 +113,7 @@ export default class UIElement extends Element {
 			 *
 			 * @error view-uielement-cannot-add
 			 */
-			throw new CKEditorError( 'view-uielement-cannot-add: Cannot add child nodes to UIElement instance.', this );
+			throw new CKEditorError( 'view-uielement-cannot-add', this );
 		}
 	}
 

+ 1 - 3
packages/ckeditor5-engine/src/view/view.js

@@ -460,9 +460,7 @@ export default class View {
 			 * @error cannot-change-view-tree
 			 */
 			throw new CKEditorError(
-				'cannot-change-view-tree: ' +
-				'Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. ' +
-				'This may cause some unexpected behavior and inconsistency between the DOM and the view.',
+				'undefinedthis-may-cause-some-unexpected-behavior-and-inconsistency-between-the-dom-and-the-view.',
 				this
 			);
 		}

+ 1 - 2
packages/ckeditor5-font/src/fontsize/fontsizeediting.js

@@ -109,8 +109,7 @@ export default class FontSizeEditing extends Plugin {
 			 * @param {Array.<String>} presets Invalid values.
 			 */
 			throw new CKEditorError(
-				'font-size-invalid-use-of-named-presets: ' +
-				'If config.fontSize.supportAllValues is set to true, you need to use numerical values as font size options.',
+				'font-size-invalid-use-of-named-presets',
 				null, { presets }
 			);
 		}

+ 1 - 1
packages/ckeditor5-font/src/fontsize/utils.js

@@ -183,7 +183,7 @@ function isNumericalDefinition( definition ) {
 			 *
 			 * @error font-size-invalid-definition
 			 */
-			throw new CKEditorError( 'font-size-invalid-definition: Provided font size definition is invalid.', null, definition );
+			throw new CKEditorError( 'font-size-invalid-definition', null, definition );
 		} else {
 			numberValue = parseFloat( definition.model );
 		}

+ 1 - 3
packages/ckeditor5-image/src/imageresize/imageresizebuttons.js

@@ -114,9 +114,7 @@ export default class ImageResizeButtons extends Plugin {
 				 * @param {module:image/imageresize/imageresizebuttons~ImageResizeOption} option Invalid image resize option.
 				*/
 				throw new CKEditorError(
-					'imageresizebuttons-missing-icon: ' +
-					'The resize option "' + name + '" misses the "icon" property ' +
-					'or the property value doesn\'t match any of the available icons.',
+					'imageresizebuttons-missing-icon',
 					editor,
 					option
 				);

+ 2 - 2
packages/ckeditor5-mention/src/mentioncommand.js

@@ -99,7 +99,7 @@ export default class MentionCommand extends Command {
 			 * @error mentioncommand-incorrect-marker
 			 */
 			throw new CKEditorError(
-				'mentioncommand-incorrect-marker: The marker must be a single character.',
+				'mentioncommand-incorrect-marker',
 				this
 			);
 		}
@@ -131,7 +131,7 @@ export default class MentionCommand extends Command {
 			 * @error mentioncommand-incorrect-id
 			 */
 			throw new CKEditorError(
-				'mentioncommand-incorrect-id: The item id must start with the marker character.',
+				'mentioncommand-incorrect-id',
 				this
 			);
 		}

+ 1 - 1
packages/ckeditor5-mention/src/mentionui.js

@@ -158,7 +158,7 @@ export default class MentionUI extends Plugin {
 				 * @error mentionconfig-incorrect-marker
 				 */
 				throw new CKEditorError(
-					'mentionconfig-incorrect-marker: The marker must be provided and it must be a single character.',
+					'mentionconfig-incorrect-marker',
 					null
 				);
 			}

+ 2 - 2
packages/ckeditor5-ui/src/componentfactory.js

@@ -85,7 +85,7 @@ export default class ComponentFactory {
 			 * @param {String} name The name of the component.
 			 */
 			throw new CKEditorError(
-				'componentfactory-item-exists: The item already exists in the component factory.',
+				'componentfactory-item-exists',
 				this,
 				{ name }
 			);
@@ -115,7 +115,7 @@ export default class ComponentFactory {
 			 * @param {String} name The name of the missing component.
 			 */
 			throw new CKEditorError(
-				'componentfactory-item-missing: The required component is not registered in the factory.',
+				'componentfactory-item-missing',
 				this,
 				{ name }
 			);

+ 3 - 3
packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js

@@ -200,7 +200,7 @@ export default class ContextualBalloon extends Plugin {
 			 * @error contextualballoon-add-view-exist
 			 */
 			throw new CKEditorError(
-				'contextualballoon-add-view-exist: Cannot add configuration of the same view twice.',
+				'contextualballoon-add-view-exist',
 				[ this, data ]
 			);
 		}
@@ -252,7 +252,7 @@ export default class ContextualBalloon extends Plugin {
 			 * @error contextualballoon-remove-view-not-exist
 			 */
 			throw new CKEditorError(
-				'contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.',
+				'contextualballoon-remove-view-not-exist',
 				[ this, view ]
 			);
 		}
@@ -320,7 +320,7 @@ export default class ContextualBalloon extends Plugin {
 			 * @error contextualballoon-showstack-stack-not-exist
 			 */
 			throw new CKEditorError(
-				'contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.',
+				'contextualballoon-showstack-stack-not-exist',
 				this
 			);
 		}

+ 4 - 4
packages/ckeditor5-ui/src/template.js

@@ -208,7 +208,7 @@ export default class Template {
 			 * @error ui-template-revert-not-applied
 			 */
 			throw new CKEditorError(
-				'ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.',
+				'ui-template-revert-not-applied',
 				[ this, node ]
 			);
 		}
@@ -381,7 +381,7 @@ export default class Template {
 			 * @error template-extend-render
 			 */
 			throw new CKEditorError(
-				'template-extend-render: Attempting to extend a template which has already been rendered.',
+				'template-extend-render',
 				[ this, template ]
 			);
 		}
@@ -414,7 +414,7 @@ export default class Template {
 			 * @error ui-template-wrong-syntax
 			 */
 			throw new CKEditorError(
-				'ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',
+				'ui-template-wrong-syntax',
 				this
 			);
 		}
@@ -1392,7 +1392,7 @@ function extendTemplate( template, def ) {
 			 * @error ui-template-extend-children-mismatch
 			 */
 			throw new CKEditorError(
-				'ui-template-extend-children-mismatch: The number of children in extended definition does not match.',
+				'ui-template-extend-children-mismatch',
 				template
 			);
 		}

+ 1 - 1
packages/ckeditor5-ui/src/view.js

@@ -464,7 +464,7 @@ export default class View {
 			 * @error ui-view-render-rendered
 			 */
 			throw new CKEditorError(
-				'ui-view-render-already-rendered: This View has already been rendered.',
+				'ui-view-render-already-rendered',
 				this
 			);
 		}

+ 1 - 1
packages/ckeditor5-ui/src/viewcollection.js

@@ -146,7 +146,7 @@ export default class ViewCollection extends Collection {
 			 * @error ui-viewcollection-delegate-wrong-events
 			 */
 			throw new CKEditorError(
-				'ui-viewcollection-delegate-wrong-events: All event names must be strings.',
+				'ui-viewcollection-delegate-wrong-events',
 				this
 			);
 		}

+ 2 - 2
packages/ckeditor5-upload/src/filerepository.js

@@ -432,7 +432,7 @@ class FileLoader {
 	 */
 	read() {
 		if ( this.status != 'idle' ) {
-			throw new CKEditorError( 'filerepository-read-wrong-status: You cannot call read if the status is different than idle.', this );
+			throw new CKEditorError( 'filerepository-read-wrong-status', this );
 		}
 
 		this.status = 'reading';
@@ -484,7 +484,7 @@ class FileLoader {
 	upload() {
 		if ( this.status != 'idle' ) {
 			throw new CKEditorError(
-				'filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.',
+				'filerepository-upload-wrong-status',
 				this
 			);
 		}

+ 6 - 6
packages/ckeditor5-utils/src/collection.js

@@ -206,7 +206,7 @@ export default class Collection {
 			 *
 			 * @error collection-add-item-bad-index
 			 */
-			throw new CKEditorError( 'collection-add-item-invalid-index: The index passed to Collection#addMany() is invalid.', this );
+			throw new CKEditorError( 'collection-add-item-invalid-index', this );
 		}
 
 		for ( let offset = 0; offset < items.length; offset++ ) {
@@ -248,7 +248,7 @@ export default class Collection {
 			 *
 			 * @error collection-get-invalid-arg
 			 */
-			throw new CKEditorError( 'collection-get-invalid-arg: Index or id must be given.', this );
+			throw new CKEditorError( 'collection-get-invalid-arg', this );
 		}
 
 		return item || null;
@@ -479,7 +479,7 @@ export default class Collection {
 			 *
 			 * @error collection-bind-to-rebind
 			 */
-			throw new CKEditorError( 'collection-bind-to-rebind: The collection cannot be bound more than once.', this );
+			throw new CKEditorError( 'collection-bind-to-rebind', this );
 		}
 
 		this._bindToCollection = externalCollection;
@@ -646,7 +646,7 @@ export default class Collection {
 				 *
 				 * @error collection-add-invalid-id
 				 */
-				throw new CKEditorError( 'collection-add-invalid-id: This item\'s id should be a string.', this );
+				throw new CKEditorError( 'collection-add-invalid-id', this );
 			}
 
 			if ( this.get( itemId ) ) {
@@ -655,7 +655,7 @@ export default class Collection {
 				 *
 				 * @error collection-add-item-already-exists
 				 */
-				throw new CKEditorError( 'collection-add-item-already-exists: This item already exists in the collection.', this );
+				throw new CKEditorError( 'collection-add-item-already-exists', this );
 			}
 		} else {
 			item[ idProperty ] = itemId = uid();
@@ -708,7 +708,7 @@ export default class Collection {
 			 *
 			 * @error collection-remove-404
 			 */
-			throw new CKEditorError( 'collection-remove-404: Item not found.', this );
+			throw new CKEditorError( 'collection-remove-404', this );
 		}
 
 		this._items.splice( index, 1 );

+ 1 - 1
packages/ckeditor5-utils/src/focustracker.js

@@ -82,7 +82,7 @@ export default class FocusTracker {
 			 *
 			 * @error focusTracker-add-element-already-exist
 			 */
-			throw new CKEditorError( 'focusTracker-add-element-already-exist: This element is already tracked by FocusTracker.', this );
+			throw new CKEditorError( 'focustracker-add-element-already-exist', this );
 		}
 
 		this.listenTo( element, 'focus', () => this._focus( element ), { useCapture: true } );

+ 1 - 1
packages/ckeditor5-utils/src/keyboard.js

@@ -61,7 +61,7 @@ export function getCode( key ) {
 			 * @param {String} key
 			 */
 			throw new CKEditorError(
-				'keyboard-unknown-key: Unknown key name.',
+				'keyboard-unknown-key',
 				null, { key }
 			);
 		}

+ 12 - 12
packages/ckeditor5-utils/src/observablemixin.js

@@ -62,7 +62,7 @@ const ObservableMixin = {
 			 *
 			 * @error observable-set-cannot-override
 			 */
-			throw new CKEditorError( 'observable-set-cannot-override: Cannot override an existing property.', this );
+			throw new CKEditorError( 'observable-set-cannot-override', this );
 		}
 
 		Object.defineProperty( this, name, {
@@ -107,7 +107,7 @@ const ObservableMixin = {
 			 *
 			 * @error observable-bind-wrong-properties
 			 */
-			throw new CKEditorError( 'observable-bind-wrong-properties: All properties must be strings.', this );
+			throw new CKEditorError( 'observable-bind-wrong-properties', this );
 		}
 
 		if ( ( new Set( bindProperties ) ).size !== bindProperties.length ) {
@@ -116,7 +116,7 @@ const ObservableMixin = {
 			 *
 			 * @error observable-bind-duplicate-properties
 			 */
-			throw new CKEditorError( 'observable-bind-duplicate-properties: Properties must be unique.', this );
+			throw new CKEditorError( 'observable-bind-duplicate-properties', this );
 		}
 
 		initObservable( this );
@@ -130,7 +130,7 @@ const ObservableMixin = {
 				 *
 				 * @error observable-bind-rebind
 				 */
-				throw new CKEditorError( 'observable-bind-rebind: Cannot bind the same property more than once.', this );
+				throw new CKEditorError( 'observable-bind-rebind', this );
 			}
 		} );
 
@@ -186,7 +186,7 @@ const ObservableMixin = {
 				 *
 				 * @error observable-unbind-wrong-properties
 				 */
-				throw new CKEditorError( 'observable-unbind-wrong-properties: Properties must be strings.', this );
+				throw new CKEditorError( 'observable-unbind-wrong-properties', this );
 			}
 
 			unbindProperties.forEach( propertyName => {
@@ -245,7 +245,7 @@ const ObservableMixin = {
 			 * @param {String} methodName Name of the method which does not exist.
 			 */
 			throw new CKEditorError(
-				'observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',
+				'observablemixin-cannot-decorate-undefined',
 				this,
 				{ object: this, methodName }
 			);
@@ -383,7 +383,7 @@ function bindTo( ...args ) {
 		 * @error observable-bind-no-callback
 		 */
 		throw new CKEditorError(
-			'observable-bind-to-no-callback: Binding multiple observables only possible with callback.',
+			'observable-bind-to-no-callback',
 			this
 		);
 	}
@@ -396,7 +396,7 @@ function bindTo( ...args ) {
 		 * @error observable-bind-to-extra-callback
 		 */
 		throw new CKEditorError(
-			'observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.',
+			'observable-bind-to-extra-callback',
 			this
 		);
 	}
@@ -409,7 +409,7 @@ function bindTo( ...args ) {
 			 *
 			 * @error observable-bind-to-properties-length
 			 */
-			throw new CKEditorError( 'observable-bind-to-properties-length: The number of properties must match.', this );
+			throw new CKEditorError( 'observable-bind-to-properties-length', this );
 		}
 
 		// When no to.properties specified, observing source properties instead i.e.
@@ -450,7 +450,7 @@ function bindToMany( observables, attribute, callback ) {
 		 *
 		 * @error observable-bind-to-many-not-one-binding
 		 */
-		throw new CKEditorError( 'observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().', this );
+		throw new CKEditorError( 'observable-bind-to-many-not-one-binding', this );
 	}
 
 	this.to(
@@ -509,7 +509,7 @@ function parseBindToArgs( ...args ) {
 		 *
 		 * @error observable-bind-to-parse-error
 		 */
-		throw new CKEditorError( 'observable-bind-to-parse-error: Invalid argument syntax in `to()`.', null );
+		throw new CKEditorError( 'observable-bind-to-parse-error', null );
 	}
 
 	const parsed = { to: [] };
@@ -526,7 +526,7 @@ function parseBindToArgs( ...args ) {
 			lastObservable = { observable: a, properties: [] };
 			parsed.to.push( lastObservable );
 		} else {
-			throw new CKEditorError( 'observable-bind-to-parse-error: Invalid argument syntax in `to()`.', null );
+			throw new CKEditorError( 'observable-bind-to-parse-error', null );
 		}
 	} );
 

+ 1 - 1
packages/ckeditor5-utils/src/translation-service.js

@@ -144,7 +144,7 @@ export function _translate( language, message, quantity = 1 ) {
 		 *
 		 * @error translation-service-quantity-not-a-number
 		 */
-		throw new CKEditorError( 'translation-service-quantity-not-a-number: Expecting `quantity` to be a number.', null, { quantity } );
+		throw new CKEditorError( 'translation-service-quantity-not-a-number', null, { quantity } );
 	}
 
 	const numberOfLanguages = getNumberOfLanguages();

+ 1 - 1
packages/ckeditor5-utils/src/version.js

@@ -147,7 +147,7 @@ if ( windowOrGlobal.CKEDITOR_VERSION ) {
 	 * @error ckeditor-duplicated-modules
 	 */
 	throw new CKEditorError(
-		'ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated.',
+		'ckeditor-duplicated-modules',
 		null
 	);
 } else {

+ 2 - 2
packages/ckeditor5-utils/tests/ckeditorerror.js

@@ -62,7 +62,7 @@ describe( 'CKEditorError', () => {
 	} );
 
 	it( 'contains a link which leads to the documentation', () => {
-		const error = new CKEditorError( 'model-schema-no-item: Specified item cannot be found.', null );
+		const error = new CKEditorError( 'model-schema-no-item', null );
 
 		const errorMessage = 'model-schema-no-item: Specified item cannot be found. ' +
 			`Read more: ${ DOCUMENTATION_URL }#error-model-schema-no-item\n`;
@@ -71,7 +71,7 @@ describe( 'CKEditorError', () => {
 	} );
 
 	it( 'link to documentation is added before the additional data message', () => {
-		const error = new CKEditorError( 'model-schema-no-item: Specified item cannot be found.', null, { foo: 1, bar: 2 } );
+		const error = new CKEditorError( 'model-schema-no-item', null, { foo: 1, bar: 2 } );
 
 		const errorMessage = 'model-schema-no-item: Specified item cannot be found. ' +
 			`Read more: ${ DOCUMENTATION_URL }#error-model-schema-no-item\n ` +

+ 1 - 1
packages/ckeditor5-utils/tests/emittermixin.js

@@ -158,7 +158,7 @@ describe( 'EmitterMixin', () => {
 
 		it( 'should rethrow the CKEditorError error', () => {
 			emitter.on( 'test', () => {
-				throw new CKEditorError( 'Foo', null );
+				throw new CKEditorError( 'foo', null );
 			} );
 
 			expectToThrowCKEditorError( () => {

+ 1 - 1
packages/ckeditor5-widget/src/utils.js

@@ -101,7 +101,7 @@ export function toWidget( element, writer, options = {} ) {
 		 * @param {String} element The view element passed to `toWidget()`.
 		 */
 		throw new CKEditorError(
-			'widget-to-widget-wrong-element-type: The element passed to toWidget() must be a container element instance.',
+			'widget-to-widget-wrong-element-type',
 			null,
 			{ element }
 		);

+ 1 - 1
packages/ckeditor5-widget/src/widgettoolbarrepository.js

@@ -154,7 +154,7 @@ export default class WidgetToolbarRepository extends Plugin {
 			 * @error widget-toolbar-duplicated
 			 * @param toolbarId Toolbar id.
 			 */
-			throw new CKEditorError( 'widget-toolbar-duplicated: Toolbar with the given id was already added.', this, { toolbarId } );
+			throw new CKEditorError( 'widget-toolbar-duplicated', this, { toolbarId } );
 		}
 
 		toolbarView.fillFromConfig( items, editor.ui.componentFactory );