Skip to content

Commit 919ab0c

Browse files
authored
Merge pull request #1202 from JuliaLang/show-exception
Remove obsolete try-catch when displaying an object
2 parents 2ea3c62 + b8413e7 commit 919ab0c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/display.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,9 @@ display_mimejson(m::MIME, x) = (m, JSONX.JSONText(limitstringmime(m, x, true)))
105105
function _display_dict(x)
106106
data = Dict{String, Union{String, JSONX.JSONText}}()
107107
for m in ijulia_mime_types
108-
try
109-
if _showable(m, x)
110-
mime, mime_repr = display_mimestring(m, x)
111-
data[string(mime)] = mime_repr
112-
end
113-
catch
114-
if m == MIME("text/plain")
115-
rethrow() # text/plain is required
116-
end
108+
if _showable(m, x)
109+
mime, mime_repr = display_mimestring(m, x)
110+
data[string(mime)] = mime_repr
117111
end
118112
end
119113

0 commit comments

Comments
 (0)