Another Question on Error Handling

T

Tom Jastrzebski

Hello everybody,

Here is how I understand ASP.Net processes the request in the context of
error handling:
the working process in the ProcessRequestMain() method (?) creates the Page
object, page controls, triggers page events like Init and Load - exact order
and details are unimportant.

What is important is that inside ProcessRequestMain() execution each of
those steps is enclosed within try/catch block, and if any exception is
caught HttpUnhandledException is being rethrown and the ProcessRequestMain()
method terminates.

Here is the question: is the any way to alter this behavior, so the
ProcessRequestMain() method does NOT terminate if, let's say, one of
controls being loaded causes exception, so the Page.Error event is triggered
but the process continues and other controls get loaded.

Conceptually, what I am looking for is similar to the
AppDomain.CurrentDomain.UnhandledException event handling mechanism.

I know about best practices and I really know how exceptions should be
handled in a perfect world but currently my world is less than perfect and I
have good reasons to temporarily do it that way.

Thank you,

Tomasz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top