We have a number of .Net user controls that we use on an Umbraco site, but I have just noticed that Umbraco seems to be swallowing unhandled exceptions thrown from the OnInit event.
If the exception is thrown from Page Load then it behaves as expected and our Custom Error Page loads up, but if it is thrown from the OnInit method then the execution of the OnInit method stops, the error is logged in our logging database (as expected) but then the Page Load method starts and the page loads as though nothing has happened.
Has anyone experienced this before? Any ways around it? Besides running the code which throws the exception later? I've been looking around the forums and the web in general and found nothing like this.
Unhandled Exceptions OnInit
Hi,
We have a number of .Net user controls that we use on an Umbraco site, but I have just noticed that Umbraco seems to be swallowing unhandled exceptions thrown from the OnInit event.
If the exception is thrown from Page Load then it behaves as expected and our Custom Error Page loads up, but if it is thrown from the OnInit method then the execution of the OnInit method stops, the error is logged in our logging database (as expected) but then the Page Load method starts and the page loads as though nothing has happened.
Has anyone experienced this before? Any ways around it? Besides running the code which throws the exception later? I've been looking around the forums and the web in general and found nothing like this.
Thanks,
Iain
Just noticed that someone posted with the exact same issue 2 years ago:
http://forum.umbraco.org/yaf_postst9722_Exception-flow-using-Macros-net-usercontrols.aspx
Nobody replied to that post on the old site. Has anybody seen this since?
Cheers, Iain
is working on a reply...