Author: mwisebaker | Posted on: 5/5/2009 7:20:46 AM | Views : 217

I've got a page set up like this:

 Private Sub Page_Init(s, e)

      Call Sub1

      Call Sub2

      Call Sub3

     ... etc.

End Sub

Each of those subs call other subs, and so on and so forth. All of the execution works fine. At various points throughout the chain, I have error checking in the form of Try/Catch blocks. At any time if an error occurs I'd like to halt all further execution and display a meaningful message to the users on an otherwise blank page.

I know I could use Response.End(), but that doesn't render any content on the page. I could also throw a New Exception("Error message") but that's very ugly and not really good form.

 Here is the sub I have written so far:

PrivateGo to the complete details ...