Przeglądaj źródła

Merge pull request #20 from ckeditor/i/1803

Docs: Error messages in manual tests and a sample should be more verbose should the editor fail to initialize (see ckeditor/ckeditor5#1803).
Aleksander Nowodzinski 6 lat temu
rodzic
commit
80c859b0e5

+ 4 - 4
packages/ckeditor5-build-inline/README.md

@@ -41,8 +41,8 @@ And use it in your website:
 		.then( editor => {
 			window.editor = editor;
 		} )
-		.catch( err => {
-			console.error( err.stack );
+		.catch( error => {
+			console.error( 'There was a problem initializing the editor.', error );
 		} );
 </script>
 ```
@@ -60,8 +60,8 @@ InlineEditor
 	.then( editor => {
 		window.editor = editor;
 	} )
-	.catch( err => {
-		console.error( err.stack );
+	.catch( error => {
+		console.error( 'There was a problem initializing the editor.', error );
 	} );
 ```
 

+ 2 - 2
packages/ckeditor5-build-inline/sample/index.html

@@ -32,8 +32,8 @@
 		.then( editor => {
 			window.editor = editor;
 		} )
-		.catch( err => {
-			console.error( err.stack );
+		.catch( error => {
+			console.error( 'There was a problem initializing the editor.', error );
 		} );
 </script>
 

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

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

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

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