diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-12-09 13:25:38 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-12-09 13:25:38 +0000 |
| commit | 192891fea7c9c78323147fd3c962a96d48f15001 (patch) | |
| tree | 0d170ac5f6eb763f71c59b9a35c65feb497af55b /src/livecode/script.cpp | |
| parent | move script to its own file (diff) | |
| download | inkscape-192891fea7c9c78323147fd3c962a96d48f15001.tar.gz inkscape-192891fea7c9c78323147fd3c962a96d48f15001.zip | |
wip: create SVGs from Janet tableslivecoding
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)); + } } } |
