Menu

keywords-catch

Will Pittenger

When an exception is thrown, somewhere, you need to catch it. That's where the catch keyword comes in. For more on exceptions, see [Exceptions]. For more on the other exception related keywords, see throws, throw, try, and finally. Each try block can have as many catch clauses as needed.

\try\
  ' Some code that might throw one or more exceptions
\catch\ ThrowableTypeName identifier
  ' Handle the exception
' repeat as needed

Related

Wiki: Appendices-Deprecated keywords, operators, and delimiters
Wiki: Exceptions
Wiki: Keywords
Wiki: keywords-finally
Wiki: keywords-throw
Wiki: keywords-throws
Wiki: keywords-try