Bug 1424359 - Follow-up: Replace re-throw with comment. r=mkmelin a=jorgk
--- 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;