private void HandleDataPortalException(string operation, Server.DataPortalException ex, bool isSync, Csla.DataPortalClient.IDataPortalProxy proxy) { var result = ex.Result; GlobalContext = result.GlobalContext; if (proxy.IsServerRemote && isSync) { ApplicationContext.ContextManager.SetGlobalContext(GlobalContext); } var original = ex.InnerException; if (original.InnerException != null) { original = original.InnerException; } throw new DataPortalException( String.Format("DataPortal.{2} {0} ({1})", Resources.Failed, original.Message, operation), ex.InnerException, result.ReturnObject); }
private void HandleDeleteDataPortalException(Server.DataPortalException ex, bool isSync, Csla.DataPortalClient.IDataPortalProxy proxy) { HandleDataPortalException("Delete", ex, isSync, proxy); }
private void HandleDataPortalException(string operation, Server.DataPortalException ex, bool isSync, Csla.DataPortalClient.IDataPortalProxy proxy) { var result = ex.Result; var original = ex.InnerException; if (original.InnerException != null) { original = original.InnerException; } throw new DataPortalException( String.Format("DataPortal.{2} {0} ({1})", Resources.Failed, original.Message, operation), ex.InnerException, result.ReturnObject); }