Removed all incidents of e.printStackTrace, wrapped errors with

NoDashFatalExceptions instead of overwriting
This commit is contained in:
Dave
2014-12-26 17:15:54 +02:00
parent 3b97efec74
commit ee72415e63
10 changed files with 69 additions and 55 deletions

View File

@@ -50,7 +50,7 @@ public abstract class NoInfluence implements Serializable {
try {
keyGen = KeyGenerator.getInstance(NoUtil.CIPHER_KEY_SPEC);
} catch (NoSuchAlgorithmException e) {
throw new NoDashFatalException("Value for CIPHER_KEY_SPEC is not valid.");
throw new NoDashFatalException("Value for CIPHER_KEY_SPEC is not valid.", e);
}
keyGen.init(NoUtil.AES_STRENGTH);
SecretKey secretKey = keyGen.generateKey();
@@ -72,7 +72,7 @@ public abstract class NoInfluence implements Serializable {
baos.close();
return encrypted;
} catch (IOException e) {
throw new NoDashFatalException("Unable to write NoInfluence object to byte stream.");
throw new NoDashFatalException("Unable to write NoInfluence object to byte stream.", e);
}
}
@@ -86,7 +86,7 @@ public abstract class NoInfluence implements Serializable {
bais.close();
return noInfluence;
} catch (IOException e) {
throw new NoDashFatalException("Unable to read out provided data stream.");
throw new NoDashFatalException("Unable to read out provided data stream.", e);
}
}