B2G/gecko/browser/extensions/pdfjs/content/web/viewer.js
/**
   * Show the error box.
   * @param {String} message A message that is human readable.
   * @param {Object} moreInfo (optional) Further information about the error
   *                            that is more technical.  Should have a 'message'
   *                            and optionally a 'stack' property.
   */
Show the error box.
@param {String} message A message that is human readable.
@param {Object} moreInfo (optional) Further information about the error
that is more technical.  Should have a 'message'
and optionally a 'stack' property.
Show the error box . @param { String } message A message that is human readable . @param { Object } moreInfo ( optional ) Further information about the error that is more technical . Should have a ' message ' and optionally a ' stack ' property .
function pdfViewError(message, moreInfo) {
    var moreInfoText = mozL10n.get('error_build', {build: PDFJS.build},
      'PDF.JS Build: {{build}}') + '\n';
    if (moreInfo) {
      moreInfoText +=
        mozL10n.get('error_message', {message: moreInfo.message},
        'Message: {{message}}');
      if (moreInfo.stack) {
        moreInfoText += '\n' +
          mozL10n.get('error_stack', {stack: moreInfo.stack},
          'Stack: {{stack}}');
      } else {
        if (moreInfo.filename) {
          moreInfoText += '\n' +
            mozL10n.get('error_file', {file: moreInfo.filename},
            'File: {{file}}');
        }
        if (moreInfo.lineNumber) {
          moreInfoText += '\n' +
            mozL10n.get('error_line', {line: moreInfo.lineNumber},
            'Line: {{line}}');
        }
      }
    }
    var loadingBox = document.getElementById('loadingBox');
    loadingBox.setAttribute('hidden', 'true');
    console.error(message + '\n' + moreInfoText);
    this.fallback();
  }
function pdfViewError ( message , moreInfo ) { var moreInfoText = mozL10n . get ( 'error_build' , { build : PDFJS . build } , 'PDF.JS Build: {{build}}' ) + '\n' ; if ( moreInfo ) { moreInfoText += mozL10n . get ( 'error_message' , { message : moreInfo . message } , 'Message: {{message}}' ) ; if ( moreInfo . stack ) { moreInfoText += '\n' + mozL10n . get ( 'error_stack' , { stack : moreInfo . stack } , 'Stack: {{stack}}' ) ; } else { if ( moreInfo . filename ) { moreInfoText += '\n' + mozL10n . get ( 'error_file' , { file : moreInfo . filename } , 'File: {{file}}' ) ; } if ( moreInfo . lineNumber ) { moreInfoText += '\n' + mozL10n . get ( 'error_line' , { line : moreInfo . lineNumber } , 'Line: {{line}}' ) ; } } } var loadingBox = document . getElementById ( 'loadingBox' ) ; loadingBox . setAttribute ( 'hidden' , 'true' ) ; console . error ( message + '\n' + moreInfoText ) ; this . fallback ( ) ; }
Show the error box.
Show the error box .