Skip to content

Commit

Permalink
Trim stack trace output from repl
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmantova committed Feb 20, 2012
1 parent 0900cdf commit cb211a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion j/show.j
Original file line number Diff line number Diff line change
Expand Up @@ -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))

This comment has been minimized.

Copy link
@StefanKarpinski

StefanKarpinski Feb 21, 2012

Member

Clever. Took me a read-through to get it, but quite clever.

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])
Expand Down

0 comments on commit cb211a2

Please sign in to comment.