summaryrefslogtreecommitdiff
path: root/src/LuaTask.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-05 09:36:28 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-05 09:36:28 +0200
commite6e2b7afcc92cf0baecd83188e859af7a510da09 (patch)
tree257da3b2324c58a4458ff600c02682f214037a04 /src/LuaTask.cc
parentb8aa9ea03b992e02ab8d362598b588e79b50bfd1 (diff)
Don't crash a LuaTask on EAgain; let it thru. Also don't yield if you crashed.
Diffstat (limited to 'src/LuaTask.cc')
-rw-r--r--src/LuaTask.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LuaTask.cc b/src/LuaTask.cc
index e7d78ff..a549563 100644
--- a/src/LuaTask.cc
+++ b/src/LuaTask.cc
@@ -80,13 +80,15 @@ void Balau::LuaTask::Do() {
else
m_cell->run(L);
}
+ catch (EAgain & e) {
+ }
catch (GeneralException & e) {
m_cell->m_exception = new GeneralException(e);
}
catch (...) {
m_cell->setError();
}
- if (L.yielded()) {
+ if (L.yielded() && !m_cell->m_exception) {
yield();
continue;
}