]> git.parisson.com Git - pdf.js.git/commitdiff
Improved error handling/message
authorArtur Adib <arturadib@gmail.com>
Thu, 19 Jan 2012 21:02:27 +0000 (16:02 -0500)
committerArtur Adib <arturadib@gmail.com>
Thu, 19 Jan 2012 21:02:27 +0000 (16:02 -0500)
web/viewer.js

index ac3fbff0ca190ffddfe5b6f313174e25355db599..9f8b772abcf19326479d4e18e3250b79c7059713 100644 (file)
@@ -353,8 +353,14 @@ var PDFView = {
 
     if (moreInfo) {
       errorMoreInfo.value += 'Message: ' + moreInfo.message;
-      if (moreInfo.stack)
+      if (moreInfo.stack) {
         errorMoreInfo.value += '\n' + 'Stack: ' + moreInfo.stack;
+      } else {
+        if (moreInfo.filename)
+          errorMoreInfo.value += '\n' + 'File: ' + moreInfo.filename;
+        if (moreInfo.filename)
+          errorMoreInfo.value += '\n' + 'Line: ' + moreInfo.lineNumber;
+      }
     }
     errorMoreInfo.rows = errorMoreInfo.value.split('\n').length - 1;
   },