From 9809f32ee0d857d186ea2e8a346803066586588b Mon Sep 17 00:00:00 2001 From: Bsian Date: Sat, 4 Jan 2020 11:18:38 +0000 Subject: [PATCH] Order fix and more diagnosis --- src/commands/eval.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 7127763..19b0fb4 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -47,20 +47,21 @@ export default class Eval extends Command { this.client.signale.note('Main'); this.client.signale.note(args); try { + this.client.signale.note(evalString); evaled = await eval(evalString); this.client.signale.note('evaluated with success'); this.client.signale.note(evaled); this.client.signale.note(typeof evaled); + if (evaled === undefined) { + this.client.signale.note('Eval undefined'); + evaled = 'undefined'; + } if (typeof evaled !== 'string') { this.client.signale.note('Eval returned not a string. Depth setting:'); this.client.signale.note(depth); evaled = inspect(evaled, { depth }); this.client.signale.note('Inspected'); } - if (evaled === undefined) { - this.client.signale.note('Eval undefined'); - evaled = 'undefined'; - } } catch (error) { this.client.signale.note('Error caught'); evaled = error.stack;