Пример #1
0
        private static DirectResponse ProcessRequest(DirectProvider provider, DirectRequest request)
        {
            DirectResponse r = new DirectResponse(request);

            try
            {
                r.Result = provider.Execute(request);
            }
            catch (Exception ex)
            {
                // Build our error message
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(ex.Message);

                Exception innerEx = ex.InnerException;
                while (innerEx != null)
                {
                    sb.AppendLine(innerEx.Message);
                    innerEx = innerEx.InnerException;
                }

                r.ExceptionMessage = sb.ToString();
                r.Type             = DirectResponse.ResponseExceptionType;
            }
            return(r);
        }
Пример #2
0
        private static DirectResponse ProcessRequest(DirectProvider provider, DirectRequest request)
        {
            DirectResponse r = new DirectResponse(request);

            try
            {
                r.Result = provider.Execute(request);
            }
            catch (DirectException ex)
            {
                r.ExceptionMessage = ex.Message;
                r.Type             = DirectResponse.ResponseExceptionType;
            }
            return(r);
        }
Пример #3
0
 private static DirectResponse ProcessRequest(DirectProvider provider, DirectRequest request)
 {
     DirectResponse r = new DirectResponse(request);
     try
     {
         r.Result = provider.Execute(request);
     }
     catch (DirectException ex)
     {
         r.ExceptionMessage = ex.Message;
         r.Type = DirectResponse.ResponseExceptionType;
     }
     return r;
 }
Пример #4
0
        private static DirectResponse ProcessRequest(DirectProvider provider, DirectRequest request)
        {
            DirectResponse r = new DirectResponse(request);
            try
            {
                r.Result = provider.Execute(request);
            }
            catch (Exception ex)
            {
                // Build our error message
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(ex.Message);

                Exception innerEx = ex.InnerException;
                while (innerEx != null)
                {
                    sb.AppendLine(innerEx.Message);
                    innerEx = innerEx.InnerException;
                }

                r.ExceptionMessage = sb.ToString();
                r.Type = DirectResponse.ResponseExceptionType;
            }
            return r;
        }