lib/instrument/global.js
function _onError(errorMessage, url, lineNumber, columnNumber, exception) {
  var onErrorReturn;

  // Execute the original window.onerror handler, if any
  if (_oldOnError && typeof _oldOnError === 'function') {
    onErrorReturn = _oldOnError.apply(this, arguments);
  }

  Canadarm.fatal(errorMessage, exception, {
    url: url,
    lineNumber: lineNumber,
    columnNumber: columnNumber
  });

  return onErrorReturn;
}
function _onError(errorMessage, url, lineNumber, columnNumber, exception) {
  var onErrorReturn;

  // Execute the original window.onerror handler, if any
  if (_oldOnError && typeof _oldOnError === 'function') {
    onErrorReturn = _oldOnError.apply(this, arguments);
  }

  Canadarm.fatal(errorMessage, exception, {
    url: url,
    lineNumber: lineNumber,
    columnNumber: columnNumber
  });

  return onErrorReturn;
}
function _onError ( errorMessage , url , lineNumber , columnNumber , exception ) { var onErrorReturn ; // Execute the original window.onerror handler, if any if ( _oldOnError && typeof _oldOnError === 'function' ) { onErrorReturn = _oldOnError . apply ( this , arguments ) ; } Canadarm . fatal ( errorMessage , exception , { url : url , lineNumber : lineNumber , columnNumber : columnNumber } ) ; return onErrorReturn ; }
Logs the errors that have occurred.  Its signature matches that of `window.onerror`.
Will replace the `window.onerror`.  It will still call the original `window.onerror`
as well if it existed.

@function _onError
@private
Logs the errors that have occurred . Its signature matches that of window . onerror . Will replace the window . onerror . It will still call the original window . onerror as well if it existed .