Page Level Error Handling


0
  2  

I created a usercontrol called error, it basically has a ra:Label in it and a public method that changes the text of the label and highlights it.

On the page containing the UC, I created a PageError method that calls the public method and passed the error text to it (the PageError method also clears the server error). The problem is, it never fires from the Page_Error method. If I use a button on the main page and call the public method from its onclick, it works fine.

How come it won't fire from the Page_Error? Any suggestion on how to get it to work?

Change ordering [current - determine]

  1  

Hi Brandon, this is more of an ASP.NET thing than a Ra-Ajax problem I assume. But if you could create a reproducible for us that we could try debugging in, I think we'd get to give you an answer ... :)

Email me at thomas@ra-ajax.org with a zip containing a simple reproducible (with only the problem reproduced) and I'll start playing with it and figure it out :)

Comments [1]
  1  

Hi Brandon, I started debugging this, and what strikes me is that it doesn't seem as ASP.NET works quite like I'd expect it to here. There is definitely something "fishy" going on... :(

[Advanced-description]
For one, ASP.NET doesn't seem to call "Close" on the Page "Filter" streams attached to the Page rendering cycle when the exception is being thrown. This is highly weird, and doesn't seem intuitive to me in any ways. And since the exception will be cleared, then also the client side logic of Ra-Ajax doesn't kick in since it doesn't get the status code 500 return from the server...
[/Advanced-description]

[temporary-fix]
I know it's probably not the coolest thing for you to hear, but until we've figured this one out, you're probably better of not clearing the error, but rather let the default logic of Ra-Ajax kick in and show the "yellow screen of death" for your exception...
[/temporary-fix]

This has priority though, since it's a pretty cool and important thing to have, also for us in the future :)

Comments [1]