Syntax throw exception It is used to generate an error condition handled by a try..catch statement or to pass errors found in these statements to higher level handlers. Using throw in a try..catch statement Please enter a number: