29 ExceptionInspector = exceptionInspector;
42 public Exception
InspectException(Type objectType,
object criteria,
string methodName, Exception ex)
44 Exception handledException;
47 if (CallExceptionInspector(objectType,
null, criteria, methodName, ex.InnerException, out handledException))
54 if (CallExceptionInspector(objectType,
null, criteria, methodName, ex, out handledException))
56 ex = handledException;
72 public Exception
InspectException(Type objectType,
object businessObject,
object criteria,
string methodName, Exception ex)
75 Exception handledException;
78 if (CallExceptionInspector(objectType, businessObject, criteria, methodName, ex.InnerException, out handledException))
86 if (CallExceptionInspector(objectType,
null, criteria, methodName, ex, out handledException))
88 ex = handledException;
106 private bool CallExceptionInspector(Type objectType,
object businessObject,
object criteria,
string methodName, Exception exception, out Exception handledException)
108 handledException =
null;
112 ExceptionInspector?.
InspectException(objectType, businessObject, criteria, methodName, exception);
116 handledException = ex;
A strongly-typed resource class, for looking up localized strings, etc.
static string MethodCallFailed
Looks up a localized string similar to method call failed.
This exception is returned from the CallMethod method in the server-side DataPortal and contains the ...
This class provides a hook for developers to add custom error handling in the DataPortal.
DataPortalExceptionHandler(IDataPortalExceptionInspector exceptionInspector)
Creates an instance of the type.
Exception InspectException(Type objectType, object businessObject, object criteria, string methodName, Exception ex)
Transforms the exception in a Update, Delete method
Exception InspectException(Type objectType, object criteria, string methodName, Exception ex)
Transforms the exception in a Fetch, Create or Execute method.
Implement this interface to check a DataPortalException before returning Exception to the client.
void InspectException(Type objectType, object businessObject, object criteria, string methodName, Exception ex)
Inspects the exception that occurred during DataPortal call If you want to transform to/return anothe...