try catch stuff

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

i know i need a try catch in my method but do i put all the contents of my
method withing the try catch or should I just put some of the code?


thanks,
ari
 
i know i need a try catch in my method but do i put all the contents of my
method withing the try catch or should I just put some of the code?

It depends on the purpose of catching the exception. Why do you need
the Try Catch block to begin with?


Mattias
 
if you need all code in the try statement ?? this depends on the code my
initial feeling would say include only the strict necessary code in it

only use try catch blocks if you really need to do so

try catch blocks have a lot of overhead and so make your program a lot
slower

it is better coding practice to check for yourself if possible


regards

Michel Posseth [MCP]
 
Back
Top