feat: add exceptions to stage

This commit is contained in:
Lin, Hung-Shin committed 2023-11-21 14:27:43 +08:00
1 parent 56d96cf7a0
commit 66ce015f0e
6 files changed
+86 -1

No files matched your search

+15
View File
@@ -63,4 +63,19 @@ export default class SessionHandler {
},
}
}
executeException(exception) {
const { hints, responses } = exception
if (hints && hints.length > 0) this.session.hints.push(hints)
return {
responses,
hints,
callback: () => {
if (hints && hints.length > 0)
pushToSession(this.session.id, 'hints', hints)
pushToSession(this.session.id, 'status', this.session.status)
},
}
}
}