'Catch' cannot catch type '<typename>' because it is not 'System.Exception' or a class that inherits from 'System.Exception'

Catch can only intercept exceptions, and you have attempted to catch something that is not derived from an exception.

Error ID: BC30392

To correct this error

  • Remove the Catch statement, or change the target of the Catch to an actual exception.

See Also

Concepts

Structured Exception Handling Overview for Visual Basic

Reference

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