Bug 1424359 - Follow-up: Replace re-throw with comment. r=mkmelin a=jorgk BETA_60_CONTINUATION
authorJorg K <jorgk@jorgk.com>
Mon, 25 Jun 2018 10:32:48 +0200
branchBETA_60_CONTINUATION
changeset 32018 219d1dcb42bb
parent 32017 b13c03b7342b
child 32019 867b2a9b3637
push id384
push userclokep@gmail.com
push date2018-06-26 01:38 +0000
reviewersmkmelin, jorgk
bugs1424359
Bug 1424359 - Follow-up: Replace re-throw with comment. r=mkmelin a=jorgk
mailnews/mime/src/jsmime.jsm
--- a/mailnews/mime/src/jsmime.jsm
+++ b/mailnews/mime/src/jsmime.jsm
@@ -22,23 +22,18 @@ function bytesToString(buffer) {
     string += String.fromCharCode(buffer[i]);
   return string;
 }
 
 // Our UTF-7 decoder.
 function UTF7TextDecoder(label, options = {}) {
   this.manager = Cc["@mozilla.org/charset-converter-manager;1"]
                    .createInstance(Ci.nsICharsetConverterManager);
-  let charset;
-  try {
-    charset = this.manager.getCharsetAlias(label);
-  } catch (ex) {
-    // Unknown charset, nothing we can do.
-    throw ex;
-  }
+  // The following will throw if the charset is unknown.
+  let charset = this.manager.getCharsetAlias(label);
   if (charset.toLowerCase() != "utf-7")
     throw new Error("UTF7TextDecoder: This code should never be reached for " + label);
   this.collectInput = "";
 }
 UTF7TextDecoder.prototype = {
   // Since the constructor checked, this will only be called for UTF-7.
   decode: function (input, options = {}) {
     let more = 'stream' in options ? options.stream : false;