How to catch exceptions by type? In the documentation I only saw examples catching all types:
try
# some code
catch e # all types
if e isa AssertionError
# handle exception
end
end
How to catch exceptions by type? In the documentation I only saw examples catching all types:
try
# some code
catch e # all types
if e isa AssertionError
# handle exception
end
end
else rethrow(e)
I like it, it is simple and doesn’t require extra syntax.