CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Server.DataPortalExceptionHandler Class Reference

This class provides a hook for developers to add custom error handling in the DataPortal. More...

Public Member Functions

 DataPortalExceptionHandler (IDataPortalExceptionInspector exceptionInspector)
 Creates an instance of the type.
Exception InspectException (Type objectType, object criteria, string methodName, Exception ex)
 Transforms the exception in a Fetch, Create or Execute method.
Exception InspectException (Type objectType, object? businessObject, object? criteria, string methodName, Exception ex)
 Transforms the exception in a Update, Delete method.

Detailed Description

This class provides a hook for developers to add custom error handling in the DataPortal.

Typical scenario is to handle non-serializable exception and exceptions from assemblies that does not exist on the client side, such as 3rd party database drivers, MQ drivers etc.

Constructor & Destructor Documentation

◆ DataPortalExceptionHandler()

Csla.Server.DataPortalExceptionHandler.DataPortalExceptionHandler ( IDataPortalExceptionInspector exceptionInspector)
inline

Creates an instance of the type.

Parameters
exceptionInspector
Exceptions
ArgumentNullExceptionexceptionInspector is null.

Member Function Documentation

◆ InspectException() [1/2]

Exception Csla.Server.DataPortalExceptionHandler.InspectException ( Type objectType,
object criteria,
string methodName,
Exception ex )
inline

Transforms the exception in a Fetch, Create or Execute method.

Parameters
objectTypeType of the object.
criteriaThe criteria.
methodNameName of the method.
exThe exception.
Exceptions
ArgumentNullExceptionobjectType , criteria or ex is null.
ArgumentExceptionmethodName is null, string.Empty or only consists of white spaces.

◆ InspectException() [2/2]

Exception Csla.Server.DataPortalExceptionHandler.InspectException ( Type objectType,
object? businessObject,
object? criteria,
string methodName,
Exception ex )
inline

Transforms the exception in a Update, Delete method.

Parameters
objectTypeType of the object.
businessObjectThe business object if available.
criteriaThe criteria.
methodNameName of the method.
exThe exception.
Exceptions
ArgumentNullExceptionobjectType or ex is null.
ArgumentExceptionmethodName is null, string.Empty or only consists of white spaces.

The documentation for this class was generated from the following file: