All docs
V18.2
19.1 (preview)
18.2
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

QueryBuilderExceptionHandler Class

Enables you to handle server-side errors in the Web Query Builder.

Namespace: DevExpress.XtraReports.Web.QueryBuilder.Services

Assembly: DevExpress.XtraReports.v18.2.Web.dll

Declaration

public class QueryBuilderExceptionHandler :
    ExceptionHandler,
    IQueryBuilderExceptionHandler,
    IExceptionHandler
Public Class QueryBuilderExceptionHandler
    Inherits ExceptionHandler
    Implements IQueryBuilderExceptionHandler,
               IExceptionHandler

Remarks

The QueryBuilderExceptionHandler 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.QueryBuilder.Services;

public class CustomQueryBuilderExceptionHandler : QueryBuilderExceptionHandler {
    public override string GetUnknownExceptionMessage(Exception ex) {
        return ex.Message;
    }
}

To register the implemented exception handler, use the static DefaultQueryBuilderContainer.Register method at the application's startup as shown below:

void Application_Start(object sender, EventArgs e) {
    // ...
    DevExpress.XtraReports.Web.QueryBuilder.DefaultQueryBuilderContainer.
      Register<IQueryBuilderExceptionHandler, CustomQueryBuilderExceptionHandler>();
}

Inheritance

Object
ExceptionHandler
QueryBuilderExceptionHandler
See Also