Skip to content

Commit

Permalink
Add ValidationNotInEnumError
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Aug 19, 2024
1 parent a625b8a commit 60bae84
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions KaitaiStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,16 @@ var ValidationNotAnyOfError = KaitaiStream.ValidationNotAnyOfError = function(ac
ValidationNotAnyOfError.prototype = Object.create(Error.prototype);
ValidationNotAnyOfError.prototype.constructor = ValidationNotAnyOfError;

var ValidationNotInEnumError = KaitaiStream.ValidationNotInEnumError = function(actual, io, srcPath) {
this.name = "ValidationNotInEnumError";
this.message = "not in the enum, got [" + actual + "]";
this.actual = actual;
this.stack = (new Error()).stack;
};

ValidationNotInEnumError.prototype = Object.create(Error.prototype);
ValidationNotInEnumError.prototype.constructor = ValidationNotInEnumError;

var ValidationExprError = KaitaiStream.ValidationExprError = function(actual, io, srcPath) {
this.name = "ValidationExprError";
this.message = "not matching the expression, got [" + actual + "]";
Expand Down

0 comments on commit 60bae84

Please sign in to comment.