Описание тега throw
NoneThrow is a keyword in various languages used for signaling an exception.
By throwing an exception the normal flow of control of a program gets interrupted. If this happens inside a try-block execution continues inside a matching catch or finally block, like in the following Java example:
try {
throw new RuntimeException("for demonstrating try-throw-catch");
System.out.println("this doesn't get executed")
} catch (RuntimeException re) {
System.out.println("flow of control goes directly here");
}
Use this tag for questions about the process or syntax of throwing exceptions.
Prefer throws for questions about the declaration of exceptions thrown by a method
Use try-catch or try-catch-finally for questions about the catching side of the exception handling.
and exception-handling for questions about the complete process of exception handling.