From 97634d0678eab947c8992979e9e791e62650a185 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Thu, 2 Jul 2020 18:01:09 -0700 Subject: [PATCH] LibJS: Hide interpreter exception debug output behind a flag --- Libraries/LibJS/Interpreter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp index c39de4b998..6ca033c0e0 100644 --- a/Libraries/LibJS/Interpreter.cpp +++ b/Libraries/LibJS/Interpreter.cpp @@ -40,6 +40,8 @@ #include #include +//#define INTERPRETER_DEBUG + namespace JS { Interpreter::Interpreter() @@ -299,7 +301,7 @@ Value Interpreter::construct(Function& function, Function& new_target, Optional< Value Interpreter::throw_exception(Exception* exception) { -#ifdef __serenity__ +#ifdef INTERPRETER_DEBUG if (exception->value().is_object() && exception->value().as_object().is_error()) { auto& error = static_cast(exception->value().as_object()); dbg() << "Throwing JavaScript Error: " << error.name() << ", " << error.message();