throwException instead of throwing exceptions manually (includes stacktrace)

This commit is contained in:
azivner
2017-12-06 19:53:23 -05:00
parent a7831ebfcd
commit a0bbd8c853
9 changed files with 16 additions and 12 deletions

View File

@@ -31,7 +31,7 @@ function pad(data) {
function encrypt(key, iv, plainText) {
if (!key) {
throw new Error("No data key!");
throwError("No data key!");
}
const plainTextBuffer = Buffer.from(plainText);