Advertisement
Guest User

NodeJS Fork Exceptions

a guest
Sep 17th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // parent.js
  3. //
  4. var fork = require('child_process').fork;
  5. var child = fork('./child.js', [], { stdio: 'inherit' });
  6.  
  7. child.on('error', function () {
  8.   console.log('error'); // never gets here
  9. });
  10.  
  11.  
  12. //
  13. // child.js
  14. //
  15. new NonExistingClass();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement