The code includes a throw statement that is not enclosed within a try block, or the code does not include an associated catch block to trap the error. Exceptions that are thrown from within the try block using the throw statement are caught outside the try block by a catch statement.
To correct this error
Enclose code that can throw an exception in a try block, and ensure there is a corresponding catch block.
Make sure a catch statement expects the correct form of exception.
If the exception is rethrown, make sure there is another corresponding catch statement.