mirror of
https://github.com/yjs/yjs.git
synced 2025-12-25 07:59:33 +01:00
Throw proper error stack when observer function thrown an error - implements #75
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"dist": "rollup -c rollup.dist.js",
|
||||
"serve": "concurrently 'serve examples' 'rollup -wc rollup.dist.js -o examples/bower_components/yjs/y.js'"
|
||||
"serve": "concurrently 'serve ..' 'rollup -wc rollup.dist.js -o examples/bower_components/yjs/y.js'"
|
||||
},
|
||||
"pre-commit": [
|
||||
"lint",
|
||||
|
||||
@@ -72,7 +72,12 @@ export default function Utils (Y) {
|
||||
}
|
||||
this.eventListeners[i](_event)
|
||||
} catch (e) {
|
||||
console.error('Your observer threw an error. This error was caught so that Yjs still can ensure data consistency! In order to debug this error you have to check "Pause On Caught Exceptions"', e)
|
||||
/*
|
||||
Your observer threw an error. This error was caught so that Yjs
|
||||
can ensure data consistency! In order to debug this error you
|
||||
have to check "Pause On Caught Exceptions" in developer tools.
|
||||
*/
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user