8
0
Просмотр исходного кода

Added human-readable messages in CKEditorErrors within Template class.

Aleksander Nowodzinski 9 лет назад
Родитель
Сommit
a1e6bdb8eb
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/ckeditor5-ui/src/template.js

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

@@ -87,7 +87,7 @@ export default class Template {
 			 *
 			 *
 			 * @error ui-template-wrong-syntax
 			 * @error ui-template-wrong-syntax
 			 */
 			 */
-			throw new CKEditorError( 'ui-template-wrong-node' );
+			throw new CKEditorError( 'ui-template-wrong-node: No DOM Node specified.' );
 		}
 		}
 
 
 		return this._renderNode( this.definition, node );
 		return this._renderNode( this.definition, node );
@@ -303,7 +303,7 @@ export default class Template {
 			 *
 			 *
 			 * @error ui-template-wrong-syntax
 			 * @error ui-template-wrong-syntax
 			 */
 			 */
-			throw new CKEditorError( 'ui-template-wrong-syntax' );
+			throw new CKEditorError( 'ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering new Node.' );
 		}
 		}
 
 
 		return def.text ?
 		return def.text ?
@@ -861,7 +861,7 @@ function extendTemplateDefinition( def, extDef ) {
 			 *
 			 *
 			 * @error ui-template-extend-children-mismatch
 			 * @error ui-template-extend-children-mismatch
 			 */
 			 */
-			throw new CKEditorError( 'ui-template-extend-children-mismatch' );
+			throw new CKEditorError( 'ui-template-extend-children-mismatch: The number of children in extended definition does not match.' );
 		}
 		}
 
 
 		extDef.children.forEach( ( extChildDef, index ) => {
 		extDef.children.forEach( ( extChildDef, index ) => {