From 5d442947f348eb357fea495a22479eb1ff81e2d3 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Fri, 22 May 2020 07:09:19 +1000 Subject: [PATCH] Better error reporting when json error happens --- runtime/js/core/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/js/core/events.js b/runtime/js/core/events.js index 81a663bd..1e9b96dd 100644 --- a/runtime/js/core/events.js +++ b/runtime/js/core/events.js @@ -108,7 +108,8 @@ export function Notify(eventName, data) { try { parsedData = JSON.parse(data); } catch (e) { - Error('Invalid JSON data sent to notify. Event name = ' + eventName); + e.message = + Error('Invalid JSON data sent to notify [Event name = ' + eventName + '] ' + e.toString()); } } // Do the callback