' Visual Basic
Try
' Calls a method in a secondary component. This call is enclosed in a
' Try block in case an exception is thrown by SecondaryComponent.
SecondaryComponent.CallMethod()
Catch e as OverflowException
' An overflow exception is caught and a new overflow exception is
' thrown to the client application. This new excpetion includes the
' original exception as the InnerException, and provides an informative
' message.
Throw New OverflowException("An overflow occurred in the xyz method", _
e)
End Try