|
@@ -230,8 +230,8 @@ ErrorOr<void> print_error(JS::PrintContext& print_context, JS::Object const& obj
|
|
if (name.is_accessor() || message.is_accessor()) {
|
|
if (name.is_accessor() || message.is_accessor()) {
|
|
TRY(print_value(print_context, &object, seen_objects));
|
|
TRY(print_value(print_context, &object, seen_objects));
|
|
} else {
|
|
} else {
|
|
- auto name_string = name.to_deprecated_string_without_side_effects();
|
|
|
|
- auto message_string = message.to_deprecated_string_without_side_effects();
|
|
|
|
|
|
+ auto name_string = TRY(name.to_string_without_side_effects());
|
|
|
|
+ auto message_string = TRY(message.to_string_without_side_effects());
|
|
TRY(print_type(print_context, name_string));
|
|
TRY(print_type(print_context, name_string));
|
|
if (!message_string.is_empty())
|
|
if (!message_string.is_empty())
|
|
TRY(js_out(print_context, " \033[31;1m{}\033[0m", message_string));
|
|
TRY(js_out(print_context, " \033[31;1m{}\033[0m", message_string));
|
|
@@ -1018,7 +1018,7 @@ ErrorOr<void> print_value(JS::PrintContext& print_context, JS::Value value, Hash
|
|
TRY(js_out(print_context, "\""));
|
|
TRY(js_out(print_context, "\""));
|
|
else if (value.is_negative_zero())
|
|
else if (value.is_negative_zero())
|
|
TRY(js_out(print_context, "-"));
|
|
TRY(js_out(print_context, "-"));
|
|
- TRY(js_out(print_context, "{}", value.to_deprecated_string_without_side_effects()));
|
|
|
|
|
|
+ TRY(js_out(print_context, "{}", TRY(value.to_string_without_side_effects())));
|
|
if (value.is_string())
|
|
if (value.is_string())
|
|
TRY(js_out(print_context, "\""));
|
|
TRY(js_out(print_context, "\""));
|
|
TRY(js_out(print_context, "\033[0m"));
|
|
TRY(js_out(print_context, "\033[0m"));
|