'Throw' statement cannot omit operand outside a 'Catch' statement or inside a 'Finally' statement

Throw statements outside of Catch statement must supply the name of an exception object.

Error ID: BC30666

To correct this error

  1. Specify the name of an exception object derived from System.Exception.

  2. Restructure your code so that the Throw statement is inside a Catch block.

See Also

Concepts

Exception Class in Visual Basic

Reference

Throw Statement (Visual Basic)

Try...Catch...Finally Statement (Visual Basic)

Other Resources

Exception and Error Handling in Visual Basic