Catching exceptions by type

question
syntax
exception

#1

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

#2

else rethrow(e)


#3

I like it, it is simple and doesn’t require extra syntax.