mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibJS: Hide interpreter exception debug output behind a flag
This commit is contained in:
parent
6cb6e47779
commit
97634d0678
Notes:
sideshowbarker
2024-07-19 05:13:14 +09:00
Author: https://github.com/mattco98
Commit: 97634d0678
Pull-request: https://github.com/SerenityOS/serenity/pull/2681
Reviewed-by: https://github.com/linusg
1 changed files with 3 additions and 1 deletions
|
@ -40,6 +40,8 @@
|
||||||
#include <LibJS/Runtime/SymbolObject.h>
|
#include <LibJS/Runtime/SymbolObject.h>
|
||||||
#include <LibJS/Runtime/Value.h>
|
#include <LibJS/Runtime/Value.h>
|
||||||
|
|
||||||
|
//#define INTERPRETER_DEBUG
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
Interpreter::Interpreter()
|
Interpreter::Interpreter()
|
||||||
|
@ -299,7 +301,7 @@ Value Interpreter::construct(Function& function, Function& new_target, Optional<
|
||||||
|
|
||||||
Value Interpreter::throw_exception(Exception* exception)
|
Value Interpreter::throw_exception(Exception* exception)
|
||||||
{
|
{
|
||||||
#ifdef __serenity__
|
#ifdef INTERPRETER_DEBUG
|
||||||
if (exception->value().is_object() && exception->value().as_object().is_error()) {
|
if (exception->value().is_object() && exception->value().as_object().is_error()) {
|
||||||
auto& error = static_cast<Error&>(exception->value().as_object());
|
auto& error = static_cast<Error&>(exception->value().as_object());
|
||||||
dbg() << "Throwing JavaScript Error: " << error.name() << ", " << error.message();
|
dbg() << "Throwing JavaScript Error: " << error.name() << ", " << error.message();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue