Trap Runtime Errors (.NET)

.NET supports common and language specific ways to handle errors at runtime. The Try statement is available for most programming languages to trap errors, while the Goto statement is available only in C# and On Error statement is available in VB.NET only.

For more information on the Try, On Error, and Goto statements beyond what is mentioned in this guide, see the documentation that comes with your development environment.