Commit 59903ab7 authored by Marek Lewandowski's avatar Marek Lewandowski

Internal: Made the error initialization catch statements more informative.

parent db4508fd
...@@ -45,8 +45,8 @@ And use it in your website: ...@@ -45,8 +45,8 @@ And use it in your website:
window.editor = editor; window.editor = editor;
} ) } )
.catch( err => { .catch( error => {
console.error( err.stack ); console.error( 'There was a problem with initializing the editor', error );
} ); } );
</script> </script>
``` ```
...@@ -67,8 +67,8 @@ DecoupledEditor ...@@ -67,8 +67,8 @@ DecoupledEditor
window.editor = editor; window.editor = editor;
} ) } )
.catch( err => { .catch( error => {
console.error( err.stack ); console.error( 'There was a problem with initializing the editor', error );
} ); } );
``` ```
......
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
document.querySelector( '.toolbar-container' ).appendChild( editor.ui.view.toolbar.element ); document.querySelector( '.toolbar-container' ).appendChild( editor.ui.view.toolbar.element );
document.querySelector( '.editable-container' ).appendChild( editor.ui.view.editable.element ); document.querySelector( '.editable-container' ).appendChild( editor.ui.view.editable.element );
} ) } )
.catch( err => { .catch( error => {
console.error( err.stack ); console.error( 'There was a problem with initializing the editor', error );
} ); } );
</script> </script>
......
...@@ -14,6 +14,6 @@ DecoupledEditor.create( document.querySelector( '#editor' ) ) ...@@ -14,6 +14,6 @@ DecoupledEditor.create( document.querySelector( '#editor' ) )
window.editor = editor; window.editor = editor;
} ) } )
.catch( err => { .catch( error => {
console.error( err.stack ); console.error( 'There was a problem with initializing the editor', error );
} ); } );
...@@ -13,6 +13,6 @@ DecoupledEditor.create( document.querySelector( '#editor' ) ) ...@@ -13,6 +13,6 @@ DecoupledEditor.create( document.querySelector( '#editor' ) )
window.editor = editor; window.editor = editor;
} ) } )
.catch( err => { .catch( error => {
console.error( err.stack ); console.error( 'There was a problem with initializing the editor', error );
} ); } );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment