summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrtt-module.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/rtt-module.js b/rtt-module.js
index 6b13a98..e8f0cae 100755
--- a/rtt-module.js
+++ b/rtt-module.js
@@ -78,6 +78,11 @@ module.exports.fuzz = function(fuzzerInputData) {
if (state.state === 'game_over') {
break
}
+
+ if (view.prompt && view.prompt.startsWith("Unknown state:")) {
+ log_crash(game_setup, state, view, step, active)
+ throw new UnknownStateError(view.prompt)
+ }
if (!view.actions) {
log_crash(game_setup, state, view, step, active)
@@ -156,6 +161,13 @@ class MaxStepsExceededError extends Error {
}
}
+class UnknownStateError extends Error {
+ constructor(message) {
+ super(message)
+ this.name = "UnknownStateError"
+ }
+}
+
class NoMoreActionsError extends Error {
constructor(message) {
super(message)