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

Commit

Permalink
Improved error code docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Oct 26, 2018
1 parent a16ad47 commit 8e37c8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/model/position.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,14 @@ export default class Position {
return this.createAfter( node );
} else if ( offset !== 0 && !offset ) {
/**
* The position offset is required.
* {@link module:engine/model/position~Position.createAt `Position.createAt()`}
* requires the offset to be specified when the first parameter is a model item.
*
* @error model-position-createAt-required-second-parameter
* @error model-position-createAt-offset-required
*/
throw new CKEditorError(
'model-position-createAt-required-second-parameter: ' +
'Position.createAt requires the second parameter offset when first parameter is a model item.' );
'model-position-createAt-offset-required: ' +
'Position.createAt() requires the offset when the first parameter is a model item.' );
}

return this.createFromParentAndOffset( node, offset );
Expand Down

0 comments on commit 8e37c8c

Please sign in to comment.