Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Docs: Updated errors names.
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Jan 8, 2019
1 parent cbd845b commit b03dce7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/controller/datacontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ export default class DataController {
get( rootName = 'main' ) {
if ( !_checkIfRootsExists( [ rootName ], this.model.document.getRootNames() ) ) {
/**
* Cannot get data from non-existing root. This error is thrown when {@link #get DataController#get() method}
* Cannot get data from a non-existing root. This error is thrown when {@link #get DataController#get() method}
* is called with non-existent root name. For example, if there is an editor instance with only `main` root,
* calling {@link #get} like:
*
* data.get( 'root2' );
*
* will throw this error.
*
* @error trying-to-get-data-from-non-existing-root
* @error datacontroller-get-non-existent-root
*/
throw new CKEditorError( 'trying-to-get-data-from-non-existing-root: Attempting to get data from non-existing root.' );
throw new CKEditorError( 'datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.' );
}

// Get model range.
Expand Down Expand Up @@ -222,17 +222,17 @@ export default class DataController {

if ( !_checkIfRootsExists( Object.keys( initialData ), this.model.document.getRootNames() ) ) {
/**
* Cannot init data on non-existing root. This error is thrown when {@link #init DataController#init() method}
* Cannot init data on a non-existing root. This error is thrown when {@link #init DataController#init() method}
* is called with non-existent root name. For example, if there is an editor instance with only `main` root,
* calling {@link #init} like:
*
* data.init( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );
*
* will throw this error.
*
* @error trying-to-init-data-on-non-existing-root
* @error datacontroller-init-non-existent-root
*/
throw new CKEditorError( 'trying-to-init-data-on-non-existing-root: Attempting to init data on non-existing root.' );
throw new CKEditorError( 'datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.' );
}

this.model.enqueueChange( 'transparent', writer => {
Expand Down Expand Up @@ -267,17 +267,17 @@ export default class DataController {

if ( !_checkIfRootsExists( Object.keys( initialData ), this.model.document.getRootNames() ) ) {
/**
* Cannot set data on non-existing root. This error is thrown when {@link #set DataController#set() method}
* Cannot set data on a non-existing root. This error is thrown when {@link #set DataController#set() method}
* is called with non-existent root name. For example, if there is an editor instance with only `main` root,
* calling {@link #set} like:
*
* data.set( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );
*
* will throw this error.
*
* @error trying-to-set-data-on-non-existing-root
* @error datacontroller-set-non-existent-root
*/
throw new CKEditorError( 'trying-to-set-data-on-non-existing-root: Attempting to set data on non-existing root.' );
throw new CKEditorError( 'datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.' );
}

this.model.enqueueChange( 'transparent', writer => {
Expand Down

0 comments on commit b03dce7

Please sign in to comment.