ESM: Changed thrown errors to OperationErrors

This commit is contained in:
n1474335 2018-05-21 18:34:52 +00:00
parent cefe3fc542
commit 0d1e5311dc
2 changed files with 6 additions and 4 deletions

View file

@ -5,6 +5,7 @@
*/
import Operation from "../Operation";
import OperationError from "../errors/OperationError";
import bcrypt from "bcryptjs";
/**
@ -38,7 +39,7 @@ Salt: ${bcrypt.getSalt(input)}
Password hash: ${input.split(bcrypt.getSalt(input))[1]}
Full hash: ${input}`;
} catch (err) {
return "Error: " + err.toString();
throw new OperationError("Error: " + err.toString());
}
}