From cb211a208da7f595dc9e7b9951f94491cb1a0218 Mon Sep 17 00:00:00 2001 From: ivanmantova Date: Mon, 20 Feb 2012 19:26:14 -0200 Subject: [PATCH] Trim stack trace output from repl --- j/show.j | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/j/show.j b/j/show.j index bc37478f1fbb6..8fcbd40017b1c 100644 --- a/j/show.j +++ b/j/show.j @@ -171,10 +171,14 @@ function show(e::MethodError) end function show(bt::BackTrace) + # We may not declare :_jl_eval_user_input + # directly so that we get a compile error + # in case its name changes in the future + const _jl_eval_function = symbol(string(_jl_eval_user_input)) show(bt.e) i = 1 t = bt.trace - while i < length(t) + while i < length(t) && t[i] != _jl_eval_function print("\n") lno = t[i+2] print("in ", t[i], ", ", t[i+1])