Skip to content

Commit c06f8e4

Browse files
committed
Use fancy connectors to group the information
1 parent 6af74c4 commit c06f8e4

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/root_object.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,20 @@ function show(io::IO, rt::Root)
5959
print(io, "Root($(rt.region), :$(rt.status))")
6060

6161
if !get(io, :compact, false) && rt.status == :unknown
62+
connector = isnothing(rt.error) ? "" : ""
63+
6264
if rt.convergence == :tolerance
63-
print(io, "\n Not converged: region size smaller than the tolerance")
65+
print(io, "\n $connector Not converged: region size smaller than the tolerance")
6466
elseif rt.convergence == :max_iterartion
65-
print(io, "\n Not converged: reached maximal number of iterations")
67+
print(io, "\n $connector Not converged: reached maximal number of iterations")
6668
elseif rt.convergence == :none
67-
print(io, "\n Not converged: the root is still being processed")
69+
print(io, "\n $connector Not converged: the root is still being processed")
6870
else
69-
print(io, "\n Not converged: unknown reason $(rt.convergence)")
71+
print(io, "\n $connector Not converged: unknown reason $(rt.convergence)")
7072
end
7173

7274
if !isnothing(rt.error)
73-
print(io, "\n Warning: error encountered during computation (use showerror(root.error) to see the whole stacktrace)\n ")
75+
print(io, "\n Warning: error encountered during computation (use showerror(root.error) to see the whole stacktrace)\n ")
7476
showerror(io, rt.error[1])
7577
end
7678
end

0 commit comments

Comments
 (0)