From d00721f7110de70f0941d20c92869c65307548ec Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 5 Jun 2019 12:23:20 +0200 Subject: [PATCH] getting ready to send errors to plotter --- Commons.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Commons.js b/Commons.js index eb9364163..a1372b3a3 100644 --- a/Commons.js +++ b/Commons.js @@ -500,6 +500,7 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { let condition; let value = false; + let error = '' try { value = eval(code); @@ -509,11 +510,13 @@ exports.newCommons = function newCommons(bot, logger, UTILITIES) { reason and others, we will simply set the value to false. */ value = false + error = err.message } condition = { key: key, - value: value + value: value, + error: error }; conditions.set(condition.key, condition);