JuliaLang/julia — pull request #6857 by mbauman (2014-05-15 16:56:05+00:00)
Title: Improve printing of try block expressions

Previously, try blocks didn't quite show their catch statements correctly, and they completely failed to display nicely when a finally block was included:

julia> :(try; do_try() catch end)
:(try # line 1:
do_try()
end)

julia> :(try; do_try() catch do_catch() end)
:(try # line 1:
do_try()
catch false
do_catch()
end)

julia> :(try; do_try() finally do_final() end)
:($(Expr(:try, :(begin # line 1:
do_try()
end), false, false, :(begin # line 1:
do_final()
end))))

With this patch, they display correctly and look much more like the written syntax:

julia> :(try; do_try() catch end)
:(try # line 1:
do_try()
catch
end)

julia> :(try; do_try() catch do_catch() end)
:(try # line 1:
do_try()
catch
do_catch()
end)

julia> :(try; do_try() finally do_final() end)
:(try # line 1:
do_try()
finally # line 1:
do_final()
end)