ReportDesignerExceptionHandler Class
Enables you to handle server-side errors in the Web Report Designer.
Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services
Assembly: DevExpress.XtraReports.v24.2.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
public class ReportDesignerExceptionHandler :
ExceptionHandler,
IReportDesignerExceptionHandler,
IExceptionHandler
Remarks
The ReportDesignerExceptionHandler class provides the following methods:
- GetUnknownExceptionMessage to handle exceptions of non-standard types, for which the Report Designer shows the standard ‘Internal Server Error’ message;
- GetFaultExceptionMessage to handle FaultException;
- GetExceptionMessage to handle all possible errors independent of their types.
The code snippet below demonstrates how to create a descendant from this class and override the GetUnknownExceptionMessage method to return an actual exception message.
using System;
using DevExpress.XtraReports.Web.ReportDesigner.Services;
public class CustomReportDesignerExceptionHandler : ReportDesignerExceptionHandler {
public override string GetUnknownExceptionMessage(Exception ex) {
return ex.Message;
}
}
To register the implemented exception handler, use the static DefaultReportDesignerContainer.Register method at the application’s startup as shown below:
void Application_Start(object sender, EventArgs e) {
// ...
DevExpress.XtraReports.Web.ReportDesigner.DefaultReportDesignerContainer.
Register<IReportDesignerExceptionHandler, CustomReportDesignerExceptionHandler>();
}
See the following topics for more information:
- Handle Server-Side Errors in the Report Designer (ASP.NET Web Forms)
- Handle Server-Side Errors in the Report Designer (ASP.NET MVC)
- Handle Server-Side Errors in the Report Designer (ASP.NET Core)
Inheritance
Object
ExceptionHandler
ReportDesignerExceptionHandler
See Also