This link explains who apply EHAB for exception that happens in service. wht if exception happens in BAL and is propogated to service.
In service i just need to convert this to Faultcontract type and porpoget to UI.
Following is a custom class which will resolve the ExceptionManger and call the HandleException to call the respective policy to handle the exception.
what if exception happens in this class. what we need to do.And what are the exception that can be caught here.
public static bool HandleExcetion(ref Exception ex)
bool rethrow = false;
if (ex is BaseException)
// do nothing as Data Access or Business Logic exception has already been logged / handled
unityContainer = new UnityContainer().AddNewExtension<EnterpriseLibraryCoreExtension>();
exManager = unityContainer.Resolve<ExceptionManager>();
// rethrow = ExceptionPolicy.HandleException(ex, "UserInterfacePolicy");
rethrow = exManager.HandleException(ex, "UserInterfacePolicy", out exceptionToRethrow);
catch (Exception exp)
what i need to impleament here or how i can use the enterprise library here
Thanks for your replies.