I don't understand why you can't just raise the error back to the caller by
using the throw command in VB. Exceptions will always bubble back to the
caller. So, eventually it should get back to the form that originally called
the function. Catch the exception there, display it, and perform a clean
shutdown.
In general, it is better to provide your error handling code in the UI
segment of your code. That way you can centralize your handling and not have
to code many, many error handling routines. Low level functions should just
raise errors and not display them. Leave that to your UI.
"th*****@msala.net" wrote:
If I have a Try Catch block that captures an exception in a function located
in a module called by a form, in other words burried in the code, and this
exception is not one that can be corrected, how do I exit the program? I
have a nice messagebox pop up and tell the user that there has been an error
and the program needs to be shut down, but I don't know how to code the shut
down.
Thanks,
Thomas
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access