diff --git a/Userland/js.cpp b/Userland/js.cpp index cfc30d217f..70caa45adb 100644 --- a/Userland/js.cpp +++ b/Userland/js.cpp @@ -344,6 +344,11 @@ bool parse_and_run(JS::Interpreter& interpreter, const StringView& source) if (interpreter.exception()) { printf("Uncaught exception: "); print(interpreter.exception()->value()); + auto trace = interpreter.exception()->trace(); + if (trace.size() > 1) { + for (auto& function_name : trace) + printf(" -> %s\n", function_name.characters()); + } interpreter.clear_exception(); return false; }