]> khamidou — GitHub mirrors - electron.git/commitdiff
Don't quit browser when get fatal js error.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 13 Apr 2013 15:38:29 +0000 (23:38 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 13 Apr 2013 15:38:29 +0000 (23:38 +0800)
browser/atom/atom.js

index ab74fd7b79969d386930b27cfb4590a9134d7c2c..94aa6489e1bce58081d4692939744e9f5e5e6547 100644 (file)
@@ -1 +1,7 @@
-console.log(process.argv);
+process.on('uncaughtException', function(error) {
+  console.error('uncaughtException:');
+  if (error.stack)
+    console.error(error.stack);
+  else
+    console.error(error.name + ': ' + error.message);
+});