Skip to main content

IReportDesignerExceptionHandler Interface

Enables you to handle server-side errors in the Web Report Designer.

Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services

Assembly: DevExpress.XtraReports.v24.1.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

public interface IReportDesignerExceptionHandler :
    IExceptionHandler

Remarks

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;
    }
}

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>();
}

The ReportDesignerExceptionHandler class is the predefined implementation of the IReportDesignerExceptionHandler interface.

See the following topics for more information:

See Also