src/openpgp.js
function onError(message, error) {
  // log the stack trace
  util.print_debug_error(error);

  // update error message
  try {
    error.message = message + ': ' + error.message;
  } catch(e) {}

  throw error;
}
function onError(message, error) {
  // log the stack trace
  util.print_debug_error(error);

  // update error message
  try {
    error.message = message + ': ' + error.message;
  } catch(e) {}

  throw error;
}
function onError ( message , error ) { // log the stack trace util . print_debug_error ( error ) ; // update error message try { error . message = message + ': ' + error . message ; } catch ( e ) { } throw error ; }
Global error handler that logs the stack trace and rethrows a high lvl error message.
@param {String} message   A human readable high level error Message
@param {Error} error      The internal error that caused the failure
Global error handler that logs the stack trace and rethrows a high lvl error message .