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); }
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); }
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; }
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; }