Comparing version 4.7.0 to 4.7.3
@@ -38,3 +38,3 @@ (function() { | ||
// error = new Error('Oops!') | ||
// debug('^4461^'); | ||
// debug '^4461^' | ||
@@ -148,26 +148,29 @@ //----------------------------------------------------------------------------------------------------------- | ||
//########################################################################################################### | ||
if (process.type === 'renderer') { | ||
window.addEventListener('error', (event) => { | ||
var message, ref, ref1, ref2, ref3; | ||
// event.preventDefault() | ||
message = ((ref = (ref1 = event.error) != null ? ref1.message : void 0) != null ? ref : "(error without message)") + '\n' + ((ref2 = (ref3 = event.error) != null ? ref3.stack : void 0) != null ? ref2 : '').slice(0, 500); | ||
OPS.log(message); | ||
// @exit_handler event.error | ||
OPS.open_devtools(); | ||
return true; | ||
}); | ||
window.addEventListener('unhandledrejection', (event) => { | ||
var message, ref, ref1, ref2, ref3; | ||
// event.preventDefault() | ||
message = ((ref = (ref1 = event.reason) != null ? ref1.message : void 0) != null ? ref : "(error without message)") + '\n' + ((ref2 = (ref3 = event.reason) != null ? ref3.stack : void 0) != null ? ref2 : '').slice(0, 500); | ||
OPS.log(message); | ||
// @exit_handler event.reason | ||
OPS.open_devtools(); | ||
return true; | ||
}); | ||
} else { | ||
process.on('uncaughtException', this.exit_handler); | ||
process.on('unhandledRejection', this.exit_handler); | ||
if (global[Symbol.for('cnd-exception-handler')] == null) { | ||
global[Symbol.for('cnd-exception-handler')] = true; | ||
if (process.type === 'renderer') { | ||
window.addEventListener('error', (event) => { | ||
var message, ref, ref1, ref2, ref3; | ||
// event.preventDefault() | ||
message = ((ref = (ref1 = event.error) != null ? ref1.message : void 0) != null ? ref : "(error without message)") + '\n' + ((ref2 = (ref3 = event.error) != null ? ref3.stack : void 0) != null ? ref2 : '').slice(0, 500); | ||
OPS.log(message); | ||
// @exit_handler event.error | ||
OPS.open_devtools(); | ||
return true; | ||
}); | ||
window.addEventListener('unhandledrejection', (event) => { | ||
var message, ref, ref1, ref2, ref3; | ||
// event.preventDefault() | ||
message = ((ref = (ref1 = event.reason) != null ? ref1.message : void 0) != null ? ref : "(error without message)") + '\n' + ((ref2 = (ref3 = event.reason) != null ? ref3.stack : void 0) != null ? ref2 : '').slice(0, 500); | ||
OPS.log(message); | ||
// @exit_handler event.reason | ||
OPS.open_devtools(); | ||
return true; | ||
}); | ||
} else { | ||
process.on('uncaughtException', this.exit_handler); | ||
process.on('unhandledRejection', this.exit_handler); | ||
} | ||
} | ||
}).call(this); |
@@ -1,2 +0,1 @@ | ||
// Generated by CoffeeScript 2.4.1 | ||
(function() { | ||
@@ -438,4 +437,9 @@ //########################################################################################################### | ||
// require './exception-handler' | ||
// require './exception-handler' | ||
// require './exception-handler' | ||
// require './exception-handler' | ||
// require './exception-handler' | ||
// xxx | ||
}).call(this); | ||
//# sourceMappingURL=tests.js.map |
{ | ||
"name": "cnd", | ||
"version": "4.7.0", | ||
"version": "4.7.3", | ||
"description": "a grab-bag NodeJS package mainly for functionalities that used to live in coffeenode-trm, coffeenode-bitsnpieces, and coffeenode-types", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3242
427200