lib/interfaces/uncaught.js
function uncaughtExceptionHandler(err) {
    var em = new ErrorMessage();

    errorHandlerRouter(err, em);
    client.sendError(em, handleProcessExit);
    setTimeout(handleProcessExit, 2000);
  }
function uncaughtExceptionHandler(err) {
    var em = new ErrorMessage();

    errorHandlerRouter(err, em);
    client.sendError(em, handleProcessExit);
    setTimeout(handleProcessExit, 2000);
  }
function uncaughtExceptionHandler ( err ) { var em = new ErrorMessage ( ) ; errorHandlerRouter ( err , em ) ; client . sendError ( em , handleProcessExit ) ; setTimeout ( handleProcessExit , 2000 ) ; }
The actual exception handler creates a new instance of `ErrorMessage`,
extracts infomation from the propagated `Error` and marshals it into the
`ErrorMessage` instance, attempts to send this `ErrorMessage` instance to
the Stackdriver Error Reporting API. Subsequently the process is
terminated.
@function uncaughtExceptionHandler
@listens module:process~event:uncaughtException
@param {Error} err - The error that has been uncaught to this point
@returns {Undefined} - does not return a value
The actual exception handler creates a new instance of ErrorMessage extracts infomation from the propagated Error and marshals it into the ErrorMessage instance attempts to send this ErrorMessage instance to the Stackdriver Error Reporting API . Subsequently the process is terminated .