Эх сурвалжийг харах

Add room for more error outputting

ApisNecros 1 жил өмнө
parent
commit
a09bff767f
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      starfish.js

+ 2 - 1
starfish.js

@@ -322,7 +322,8 @@ class CodeBox {
             }
         }
         catch(e) {
-            console.error(`Something smells fishy!\nInstruction: ${instruction}\nStack: ${JSON.stringify(this.stack.stack)}`);
+            console.error(`Something smells fishy!\n${e != "" ? `${e}\n` : ""}Instruction: ${instruction}\nStack: ${JSON.stringify(this.stack.stack)}`);
+            return true;
         }
 
         return output;