CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Server.SanitizingExceptionInspector Class Reference

Sanitizing implementation of exception inspector, for hiding sensitive information in exception details. More...

Inheritance diagram for Csla.Server.SanitizingExceptionInspector:
Csla.Server.IDataPortalExceptionInspector

Public Member Functions

 SanitizingExceptionInspector (IHostEnvironment environment, ApplicationContext applicationContext, ILogger< SanitizingExceptionInspector > logger)
 Constructor. More...
 
void InspectException (Type objectType, object businessObject, object criteria, string methodName, Exception ex)
 Logs the exception that occurred during DataPortal call, then throws a generic, less detailed exception for return to the client More...
 

Detailed Description

Sanitizing implementation of exception inspector, for hiding sensitive information in exception details.

Only sanitizes exceptions from remote dataportals

Definition at line 19 of file SanitizingExceptionInspector.cs.

Constructor & Destructor Documentation

◆ SanitizingExceptionInspector()

Csla.Server.SanitizingExceptionInspector.SanitizingExceptionInspector ( IHostEnvironment  environment,
ApplicationContext  applicationContext,
ILogger< SanitizingExceptionInspector logger 
)

Constructor.

Parameters
environmentThe host environment in which we are operating
applicationContextThe context of the current request
loggerThe logger to which to log exceptions

Definition at line 32 of file SanitizingExceptionInspector.cs.

Member Function Documentation

◆ InspectException()

void Csla.Server.SanitizingExceptionInspector.InspectException ( Type  objectType,
object  businessObject,
object  criteria,
string  methodName,
Exception  ex 
)

Logs the exception that occurred during DataPortal call, then throws a generic, less detailed exception for return to the client

Parameters
objectTypeType of the object.
businessObjectThe business object, if available.
criteriaThe criteria.
methodNameName of the method.
exThe exception.

Implements Csla.Server.IDataPortalExceptionInspector.

Definition at line 48 of file SanitizingExceptionInspector.cs.