xtrareports-devexpress-dot-xtrareports-dot-web-dot-reportdesigner-dot-services-3a4c3747.md
Enables you to handle server-side errors in the Web Report Designer.
Namespace : DevExpress.XtraReports.Web.ReportDesigner.Services
Assembly : DevExpress.XtraReports.v25.2.Web.dll
NuGet Package : DevExpress.Web.Reporting.Common
public class ReportDesignerExceptionHandler :
ExceptionHandler,
IReportDesignerExceptionHandler,
IExceptionHandler
Public Class ReportDesignerExceptionHandler
Inherits ExceptionHandler
Implements IReportDesignerExceptionHandler,
IExceptionHandler
The ReportDesignerExceptionHandler class provides the following methods:
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;
}
}
Imports System
Imports DevExpress.XtraReports.Web.ReportDesigner.Services
Public Class CustomReportDesignerExceptionHandler
Inherits ReportDesignerExceptionHandler
Public Overrides Function GetUnknownExceptionMessage(ByVal ex As Exception) As String
Return ex.Message
End Function
End Class
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>();
}
Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' ...
DevExpress.XtraReports.Web.ReportDesigner.DefaultReportDesignerContainer.
Register(Of IReportDesignerExceptionHandler, CustomReportDesignerExceptionHandler)()
End Sub
See the following topics for more information:
IReportDesignerExceptionHandler
Object ExceptionHandler ReportDesignerExceptionHandler
See Also
ReportDesignerExceptionHandler Members
DevExpress.XtraReports.Web.ReportDesigner.Services Namespace