summaryrefslogtreecommitdiffstats
path: root/src/livecode/script.cpp
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2019-12-09 13:25:38 +0000
committers-ol <s-ol@users.noreply.github.com>2019-12-09 13:25:38 +0000
commit192891fea7c9c78323147fd3c962a96d48f15001 (patch)
tree0d170ac5f6eb763f71c59b9a35c65feb497af55b /src/livecode/script.cpp
parentmove script to its own file (diff)
downloadinkscape-livecoding.tar.gz
inkscape-livecoding.zip
wip: create SVGs from Janet tableslivecoding
Diffstat (limited to 'src/livecode/script.cpp')
-rw-r--r--src/livecode/script.cpp5
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));
+ }
}
}