A throw statement is used without an argument outside a catch block. The only place where a throw statement can be used without an argument is within a catch block, in which case it rethrows the error that was caught.
To correct this error
-
Pass an argument to the throw statement.
-
Move the throw statement to a catch block.
See Also
Reference
try...catch...finally Statementthrow Statement