ExceptionHandler.GetUnknownExceptionMessage(Exception) Method

Enables you to handle server-side errors of non-standard types.

Namespace: DevExpress.XtraReports.Web.ClientControls

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


public virtual string GetUnknownExceptionMessage(
    Exception ex


Name Type Description
ex Exception

An exception that occurs on the server side.


Type Description

A string to show in a browser when an error occurs.


Web Reporting Controls display the standard “Internal Server Error” message in a browser for unknown errors (for instance, when you try to open a broken report layout or a file that does not exist).

The GetUnknownExceptionMessage method is called whenever such an error occurs. You can override this method and return a string with error details or meaningful message.

The following classes are inherited from the base ExceptionHandler class and provide this method:

The code snippet below demonstrates how to create a descendant from the ReportDesignerExceptionHandler class and override the GetExceptionMessage 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) {
    // ...
        Register<IReportDesignerExceptionHandler, CustomReportDesignerExceptionHandler>();

See the following topics for more information:

See Also