xtrareports-devexpress-dot-xtrareports-dot-web-dot-reportdesigner-dot-services-5fa10bad.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 interface IReportDesignerExceptionHandler :
IExceptionHandler
Public Interface IReportDesignerExceptionHandler
Inherits IExceptionHandler
This interface is inherited from the base IExceptionHandler interface and exposes the GetExceptionMessage method that is called when any server-side error occurs.
The following code snippet demonstrates how to implement this method and return an actual exception message:
using System;
using DevExpress.XtraReports.Web.ReportDesigner.Services;
public class CustomExceptionHandler : IReportDesignerExceptionHandler {
public string GetExceptionMessage(Exception ex) {
return ex.Message;
}
}
Imports System
Imports DevExpress.XtraReports.Web.ReportDesigner.Services
Public Class CustomExceptionHandler
Inherits IReportDesignerExceptionHandler
Public Function GetExceptionMessage(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, CustomExceptionHandler>();
}
Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' ...
DevExpress.XtraReports.Web.ReportDesigner.DefaultReportDesignerContainer.
Register(Of IReportDesignerExceptionHandler, CustomExceptionHandler)()
End Sub
The ReportDesignerExceptionHandler class is the predefined implementation of the IReportDesignerExceptionHandler interface.
See the following topics for more information:
See Also
IReportDesignerExceptionHandler Members
DevExpress.XtraReports.Web.ReportDesigner.Services Namespace