如何在VB.NET中引发异常?
你会抛出一个新的异常。
原文链接:https://www.f2er.com/vb/256222.html看看Throw Statement (Visual Basic)
The Throw statement throws an exception that you can handle with
structured exception-handling code (Try…Catch…Finally) or
unstructured exception-handling code (On Error GoTo). You can use the
Throw statement to trap errors within your code because Visual Basic
moves up the call stack until it finds the appropriate
exception-handling code.
编辑
按请求和从链接
Throw New System.Exception("An exception has occurred.")