throw operator — Throws an exception
throw-expr ::= throw [assignment-expr]
The throw
operator throws
assignment-expr
as an exception.
The throw
expression has type
void
. With no operand, throw
rethrows the current pending
exception. If no exception is pending, terminate( )
is called.