8
0
Pārlūkot izejas kodu

Internal: Made the error initialization catch statements more informative.

Marek Lewandowski 6 gadi atpakaļ
vecāks
revīzija
acc58905c6

+ 4 - 4
packages/ckeditor5-build-classic/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 with initializing the editor', error );
 		} );
 </script>
 ```
@@ -60,8 +60,8 @@ ClassicEditor
 	.then( 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-classic/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 with initializing the editor', error );
 		} );
 </script>
 

+ 4 - 4
packages/ckeditor5-build-classic/tests/manual/ckeditor-amd-version.html

@@ -37,8 +37,8 @@
 			.then( editor => {
 				window.editor = editor;
 			} )
-			.catch( err => {
-				console.error( err.stack );
+			.catch( error => {
+				console.error( 'There was a problem with initializing the editor', error );
 			} );
 	} );
 
@@ -50,8 +50,8 @@
 			.then( editor => {
 				window.editor = editor;
 			} )
-			.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-classic/tests/manual/ckeditor-cjs-version.js

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

+ 4 - 4
packages/ckeditor5-build-classic/tests/manual/ckeditor-global-version.html

@@ -37,8 +37,8 @@
 		.then( editor => {
 			window.editor = editor;
 		} )
-		.catch( err => {
-			console.error( err.stack );
+		.catch( error => {
+			console.error( 'There was a problem with initializing the editor', error );
 		} );
 
 	ClassicEditor
@@ -48,8 +48,8 @@
 		.then( editor => {
 			window.editor = editor;
 		} )
-		.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-classic/tests/manual/ckeditor.js

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