Събитие
Създаване на интелигентни приложения
17.03, 21 ч. - 21.03, 10 ч.
Присъединете се към поредицата срещи, за да изградите мащабируеми AI решения, базирани на реални случаи на употреба с колеги разработчици и експерти.
Регистрирайте се сегаТози браузър вече не се поддържа.
Надстройте до Microsoft Edge, за да се възползвате от най-новите функции, актуализации на защитата и техническа поддръжка.
Throws an exception within a procedure.
Throw [ expression ]
expression
Provides information about the exception to be thrown. Optional when residing in a Catch
statement, otherwise required.
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.
A Throw
statement with no expression can only be used in a Catch
statement, in which case the statement rethrows the exception currently being handled by the Catch
statement.
The Throw
statement resets the call stack for the expression
exception. If expression
is not provided, the call stack is left unchanged. You can access the call stack for the exception through the StackTrace property.
The following code uses the Throw
statement to throw an exception:
' Throws a new exception.
Throw New System.Exception("An exception has occurred.")
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка:
Събитие
Създаване на интелигентни приложения
17.03, 21 ч. - 21.03, 10 ч.
Присъединете се към поредицата срещи, за да изградите мащабируеми AI решения, базирани на реални случаи на употреба с колеги разработчици и експерти.
Регистрирайте се сега