ErrorForm - aspx-page that shows an unhandled exception, it is called in Global.asax.
WebErrorBoxRiser - control, which is used to display exceptions.
Display exception
In order to show the beautiful window with the processed exception call the WebErrorBox.Rise(exception, showDetails, errorCaption).
Example:
try
{
// Do something unsafe.
}
catch (Exception ex)
{
WebErrorBoxRiser.Rise(ex, false, "An error occurred while processing the form");
}
Display ErrorForm
ErrorForm is displayed when an unhandled exception occurs. It shows the incident the exception.
Note: it is Possible when in
Page_Load page an exception is handled using WebErrorBoxRiser, but after that will be called Page_Load controls, which, in turn, will create an exception. Thus, an error window will not appear and will appear ErrorForm, which displays to the exclusion of the control and the exception that is processed in WebErrorBoxRiser.Display WebErrorBoxRiser
When you call the method
WebErrorBoxRiser.Rise(exception, showDetails, errorCaption)
an exception is added to
HttpContext.Current.Items[WebParamController.PageFilter_WebErrorBoxExceptions]
Then, by ICSSoft.STORMNET.Web.HttpModules.ResponseFilterModule, is called Render have WebErrorBoxRiser that generates the Html and displays the page.
To get all the exceptions that were added using the WebErrorBoxRiser you should use
(List<WebErrorBoxRiser>) HttpContext.Current.Items[WebParamController.PageFilter_WebErrorBoxExceptions];
Show dopolnitelnoi information about the exception
To see StackTrace on the page you want to add to web.config in <appSettings>
<add key="ShowErrorDetails" value="true" />