Skip to content

Commit

Permalink
handle uncaught exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Oct 21, 2018
1 parent a7ea2ff commit 8e26ceb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,7 @@ Prototype REPL - https://github.com/nodejs/repl`,
);

io.setPrefix('> ');

process.setUncaughtExceptionCaptureCallback((e) => {
process.stdout.write(`${inspect(e)}\n> `);
});

0 comments on commit 8e26ceb

Please sign in to comment.