exception question

C

Cc

just dumb question,
is system.exception is a global exception? for example rather than use
odbcexception to catch odbc error I can use system.exception
 
L

Lucas Tam

just dumb question,
is system.exception is a global exception? for example rather than use
odbcexception to catch odbc error I can use system.exception


Hi,

Yes, System.Exception is the highest level of exception. From there, you
can catch specific exceptions such as ODBCException.

So, if you go:

Try

'Blah

Catch e as Exception

End Try

It'll catch any exception that occurs in the Try block.
 
S

Scott M.

But you can also trap for more than one kind of exception and if you are
doing this, be sure to trap for the system.exception LAST since every
exception is a form of an exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top