_includes/bits/2019/07/30/more-robust-javascript-error-reporting/error-reporting.js
/** Reports an error to the configured report URL.
   * @param {string=} message Optional error message.
   * @param {*} error Optional error message.
   * @return {bool} Was the report successfully sent or queued to send?
   * Note: An error is logged to the console if the report can not be sent.
   */
Reports an error to the configured report URL.
@param {string=} message Optional error message.
@param {*} error Optional error message.
@return {bool} Was the report successfully sent or queued to send.
Note: An error is logged to the console if the report can not be sent.
Reports an error to the configured report URL . @param { string = } message Optional error message . @param { * } error Optional error message . @return { bool } Was the report successfully sent or queued to send . Note : An error is logged to the console if the report can not be sent .
function reportError(message, error) {
    if (error == null && typeof message !== 'string') {
      error = message;
      message = undefined;
    }
    logError(message || 'Reporting error', error);
    return sendError({
      type: 'error',
      message: message == null ? undefined : String(message),
      error: error
    });
  }
function reportError ( message , error ) { if ( error == null && typeof message !== 'string' ) { error = message ; message = undefined ; } logError ( message || 'Reporting error' , error ) ; return sendError ( { type : 'error' , message : message == null ? undefined : String ( message ) , error : error } ) ; }
Reports an error to the configured report URL.
Reports an error to the configured report URL .
// Log error to console for parity with unhandled exceptions