diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/squirrel.cpp | 6 | ||||
-rw-r--r-- | src/script/squirrel.hpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp index 31dcf6aea..1dd407589 100644 --- a/src/script/squirrel.cpp +++ b/src/script/squirrel.cpp @@ -187,6 +187,12 @@ bool Squirrel::Resume(int suspend) return this->vm->_suspended != 0; } +void Squirrel::ResumeError() +{ + assert(!this->crashed); + sq_resumeerror(this->vm); +} + void Squirrel::CollectGarbage() { sq_collectgarbage(this->vm); diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp index 612c6ce2e..97dd7988d 100644 --- a/src/script/squirrel.hpp +++ b/src/script/squirrel.hpp @@ -107,6 +107,11 @@ public: bool Resume(int suspend = -1); /** + * Resume the VM with an error so it prints a stack trace. + */ + void ResumeError(); + + /** * Tell the VM to do a garbage collection run. */ void CollectGarbage(); |