diff --git a/Userland/js.cpp b/Userland/js.cpp index cf8f2c9cc6..a4adc7d084 100644 --- a/Userland/js.cpp +++ b/Userland/js.cpp @@ -287,6 +287,9 @@ bool parse_and_run(JS::Interpreter& interpreter, const StringView& source) if (parser.has_errors()) { auto error = parser.errors()[0]; + auto hint = error.source_location_hint(source); + if (!hint.is_empty()) + printf("%s\n", hint.characters()); interpreter.throw_exception(error.to_string()); } else { interpreter.run(*program);