code: function(error, cb0) {
              var doShutdown = function(errorMsg, cb1) {
                  $._.$.log && $._.$.log.error('handleError: Error in handler, ' +
                                               'force shutdown ' + errorMsg);
  
                  $._.__ca_shutdown__(null, function(err0) {
                      if (err0) {
                          $._.$.log && $._.$.log
                              .fatal('handleError: Critical shutdown' +
                                     ' failed, exiting '
                                     + myUtils.errToPrettyStr(err0));
                          process.exit(1);
                      } else {
                          cb1(null);
                      }
                  });
              };
              var cb1 = function(err) {
                  if (err) {
                      doShutdown(myUtils.errToPrettyStr(err), cb0);
                  } else {
                      $._.__ca_abort__(function(err0) {
                          if (err0) {
                              doShutdown(myUtils.errToPrettyStr(err0), cb0);
                          } else {
                              cb0(null);
                          }
                      });
                  }
              };
              if ($._.$.handler && $._.$.handler.__iot_error__) {
                  var f = myUtils.wrapAsyncFunction($._.$.handler.__iot_error__,
                                                    $._.$.handler);
                  f(error, cb1);
              } else {
                  // no app error handler, shutdown
                  cb1(error);
              }
          }
docs: Strategy to handle errors:
  
  1) Call user level handler with the error
  
  1a) Handler propagates error in callback
  -Shutdown top level. If shutdown fails exit process.
  
  1b) Handler does not propagate the error in callback:
  -Abort transaction. If abort fails follow as in 1a)
  
  or if there is no user level handler follow as in 1a)