Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private void HandleDeleteDataPortalException(Server.DataPortalException ex, bool isSync, Csla.DataPortalClient.IDataPortalProxy proxy)
 {
     HandleDataPortalException("Delete", ex, isSync, proxy);
 }
Ejemplo n.º 3
0
        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);
        }