diff options
Diffstat (limited to 'src/livecode/script.cpp')
| -rw-r--r-- | src/livecode/script.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/livecode/script.cpp b/src/livecode/script.cpp index d4761847a..90d0de1cd 100644 --- a/src/livecode/script.cpp +++ b/src/livecode/script.cpp @@ -27,7 +27,10 @@ Script::Script(JanetTable *env, std::string const &path) void Script::frame() { if (function) { Janet result; - janet_pcall(function, 0, NULL, &result, NULL); + JanetSignal status = janet_pcall(function, 0, NULL, &result, NULL); + if (status == JANET_SIGNAL_ERROR && janet_checktype(result, JANET_STRING)) { + g_message("error executing Janet Script: %s", (gchar const *)janet_unwrap_string(result)); + } } } |
