Comment 8 for bug 1370115

Revision history for this message
Marten de Vries (marten-de-vries) wrote :

Good point. Setting err.message and then throw(err);-ing again instead of creating a new Error object should be no problem. Result would be something like:

try {
  //method call
} catch (err) {
  if (err.name === "Error" /* && maybe another check, need to check the source for that */) {
    err.message = "Security methods already installed"; //or something similar
  }
  throw(err);
}

Is that ok with you considering the above?