Throw proper error stack when observer function thrown an error - implements #75
This commit is contained in:
		
							parent
							
								
									a6a321da10
								
							
						
					
					
						commit
						85e488bbe6
					
				@ -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)
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user