Skip to content

Instantly share code, notes, and snippets.

@imchao9
Created March 7, 2016 15:11
Show Gist options
  • Save imchao9/7377529d0698c1a03f5d to your computer and use it in GitHub Desktop.
Save imchao9/7377529d0698c1a03f5d to your computer and use it in GitHub Desktop.
nodejs 捕获uncaughtException 异常
process.on('uncaughtException', function(err) {
//do something
fs.appendFile("E:\\Work\\codemao\\code\\node\\electron-x32\\resources\\1.txt", err.stack, function(err1){
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment