Skip to content

Commit dc19a24

Browse files
committed
Update error messages
1 parent c4a7156 commit dc19a24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
3131
CipherBase.prototype.setAutoPadding = function () {}
3232

3333
CipherBase.prototype.getAuthTag = function () {
34-
throw new Error('Subclasses should implement this')
34+
throw new Error('trying to get auth tag in unsupported state')
3535
}
3636

3737
CipherBase.prototype.setAuthTag = function () {
38-
throw new Error('Subclasses should implement this')
38+
throw new Error('trying to set auth tag in unsupported state')
3939
}
4040

4141
CipherBase.prototype.setAAD = function () {
42-
throw new Error('Subclasses should implement this')
42+
throw new Error('trying to set aad in unsupported state')
4343
}
4444

4545
CipherBase.prototype._transform = function (data, _, next) {

0 commit comments

Comments
 (0)