浏览代码

Internal: Made the error initialization catch statements more informative.

Marek Lewandowski 6 年之前
父节点
当前提交
1a8274f77b

+ 5 - 5
packages/ckeditor5-build-decoupled-document/README.md

@@ -45,8 +45,8 @@ And use it in your website:
 
 			window.editor = editor;
 		} )
-		.catch( err => {
-			console.error( err.stack );
+		.catch( error => {
+			console.error( 'There was a problem with initializing the editor', error );
 		} );
 </script>
 ```
@@ -67,9 +67,9 @@ DecoupledEditor
 
 			window.editor = editor;
 		} )
-	.catch( err => {
-		console.error( err.stack );
-	} );
+		.catch( error => {
+			console.error( 'There was a problem with initializing the editor', error );
+		} );
 ```
 
 **Note:** If you are planning to integrate CKEditor 5 deep into your application, it is actually more convenient and recommended to install and import the source modules directly (like it happens in `ckeditor.js`). Read more in the [Advanced setup guide](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/advanced-setup.html).

+ 2 - 2
packages/ckeditor5-build-decoupled-document/sample/index.html

@@ -64,8 +64,8 @@
 		document.querySelector( '.toolbar-container' ).appendChild( editor.ui.view.toolbar.element );
 		document.querySelector( '.editable-container' ).appendChild( editor.ui.view.editable.element );
 	} )
-	.catch( err => {
-		console.error( err.stack );
+	.catch( error => {
+		console.error( 'There was a problem with initializing the editor', error );
 	} );
 </script>
 

+ 2 - 2
packages/ckeditor5-build-decoupled-document/tests/manual/ckeditor-cjs-version.js

@@ -14,6 +14,6 @@ DecoupledEditor.create( document.querySelector( '#editor' ) )
 
 		window.editor = editor;
 	} )
-	.catch( err => {
-		console.error( err.stack );
+	.catch( error => {
+		console.error( 'There was a problem with initializing the editor', error );
 	} );

+ 2 - 2
packages/ckeditor5-build-decoupled-document/tests/manual/ckeditor.js

@@ -13,6 +13,6 @@ DecoupledEditor.create( document.querySelector( '#editor' ) )
 
 		window.editor = editor;
 	} )
-	.catch( err => {
-		console.error( err.stack );
+	.catch( error => {
+		console.error( 'There was a problem with initializing the editor', error );
 	} );