I
iowna uass
Hi,
I'm converting a dll from VB6 to VS2008 and I have a question on when
exception handling should be used. The dll is a custom module that
integrates security into our corporate applications and is only used in our
environment.
The existing dll app uses err.raise to move the error up the stack.
My question is, do I need to use Try Catch blocks to handle exceptions? or
can if I write more robust code to deal with possible exception scenarios
(eg. use FileExist before trying to read file) and let the call stack trace
up to the app that is using the dll and handle it there?
I've been reading up on exception handling and MS recommends not to Throw
errors unless it's necessary. Something about using a lot of resources to do
this.
I'm converting a dll from VB6 to VS2008 and I have a question on when
exception handling should be used. The dll is a custom module that
integrates security into our corporate applications and is only used in our
environment.
The existing dll app uses err.raise to move the error up the stack.
My question is, do I need to use Try Catch blocks to handle exceptions? or
can if I write more robust code to deal with possible exception scenarios
(eg. use FileExist before trying to read file) and let the call stack trace
up to the app that is using the dll and handle it there?
I've been reading up on exception handling and MS recommends not to Throw
errors unless it's necessary. Something about using a lot of resources to do
this.