コード例 #1
0
ファイル: DirectProcessor.cs プロジェクト: westy/Ext.Direct
        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
ファイル: DirectProcessor.cs プロジェクト: westy/Ext.Direct
        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;
        }