]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Make any code execution errors visible to the users
[zombocom-ai] / index.js
index 2f990748b218d9bc37b4cc5872aa6e793bf83197..bfa6d8a1b76342d9a33e8a5469b2ce8523fd1435 100644 (file)
--- a/index.js
+++ b/index.js
@@ -300,7 +300,8 @@ io_bus.on("connection", (socket) => {
            // Give all clients the new image
            io_bus.emit('output', filename);
        } catch (e) {
-           console.log("Error executing turtle script: " + e);
+           // Send any error out to the users
+           io_bus.emit('error', e.toString())
        }
     });