From 192891fea7c9c78323147fd3c962a96d48f15001 Mon Sep 17 00:00:00 2001 From: s-ol Date: Mon, 9 Dec 2019 14:25:38 +0100 Subject: wip: create SVGs from Janet tables --- src/livecode/script.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/livecode/script.cpp') 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)); + } } } -- cgit v1.2.3