A
aaj
Hi all
I have an automated application, that runs in the middle of the night.
If certain 'non system' errors occur (things like malformed files, missing
files etc..), I send an automatic Email and write a record to the database.
This is handled in a class.
When these errors occur, once Emailed and written I want to just end the
App, simple as that.
My inital thought was to End the Application at the end of the error
handling class using Application.Exit or Environment Exit. this means I just
write the code once and thats it, the App stops dead!! But while reading up,
It seems to be bad practice.
Is a better way to set a flag within the Error handling class, work its way
up the chain and then exit in the form code. The only problem is, some of
the error handling is nested quite deeply and passing this back to the top
level form may get a bit messy.
Does anyone have any recommendations for best practices on dealing with this
type of error handling.
many thanks.
Andy
I have an automated application, that runs in the middle of the night.
If certain 'non system' errors occur (things like malformed files, missing
files etc..), I send an automatic Email and write a record to the database.
This is handled in a class.
When these errors occur, once Emailed and written I want to just end the
App, simple as that.
My inital thought was to End the Application at the end of the error
handling class using Application.Exit or Environment Exit. this means I just
write the code once and thats it, the App stops dead!! But while reading up,
It seems to be bad practice.
Is a better way to set a flag within the Error handling class, work its way
up the chain and then exit in the form code. The only problem is, some of
the error handling is nested quite deeply and passing this back to the top
level form may get a bit messy.
Does anyone have any recommendations for best practices on dealing with this
type of error handling.
many thanks.
Andy