diff WebApplication/viewer.js @ 234:083d0cbcbac4 transcoding

improved error message
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 11 May 2020 16:02:34 +0200
parents aee499712ac4
children e376158e2dbb
line wrap: on
line diff
--- a/WebApplication/viewer.js	Mon May 11 15:38:39 2020 +0200
+++ b/WebApplication/viewer.js	Mon May 11 16:02:34 2020 +0200
@@ -23,6 +23,7 @@
 var compression = 'jpeg95';
 var isFirst = true;
 //var compression = 'deflate';
+var unsupportedMessage = 'Error: The Orthanc core does not support the decoding of this image. Make sure that you have properly installed a suitable decoder plugin (e.g. the official GDCM decoder plugin).';
 
 
 // Prevent the access to IE
@@ -383,7 +384,7 @@
         result = image;
       },
       error: function() {
-        alert('Error: This image is not supported by the Web viewer.');
+        alert(unsupportedMessage);
         return null;
       }
     });
@@ -430,7 +431,7 @@
       }
     },
     failure: function() {
-      alert('Error: This image is not supported by the Web viewer.');
+      alert(unsupportedMessage);
     }
   });