Does VB allow multi catch in one try?

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

is it possible?

try

Catch ex as system.exception

Catch exs as securityException


end try
 
Mat said:
is it possible?

try

Catch ex as system.exception

Catch exs as securityException


end try

Yes. Didn't you test it?
 
As everyone else has said , it does butt one thing to note is to have the
broder exception categories later in your catch clause because catch
system.exception will catch them before the catch statement designed to
catch them will if the are not in order.
 
As everyone else has said , it does butt one thing to note is to have the
broder exception categories later in your catch clause because catch
system.exception will catch them before the catch statement you intended to
catch them if the are not in order ascending order (LOL).
Does that make sense
 

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

Similar Threads

Using reference in VB 1
Problem with Try Catch Block 2
Try ... Catch Loop 7
Try Catch Exception 14
Try inside Try 4
rs232 3
Try/Catch block within a Tab Page validating event 3
multithreading problem in winforms 2

Back
Top