public override CompositeFillErrors Run(Exception ex)
        {
            int    code;
            string message = "";
            HalHttpRequestException myex = (HalHttpRequestException)ex.InnerException;

            code    = Int32.Parse(myex.Resource.State.Values.First(t => t.Name.Equals("ErrorCode")).Value.ToString());
            message = myex.Resource.State.Values.First(t => t.Name.Equals("ErrorDescription")).Value;
            KeyValuePair <int, string> rowerror = ClientCodeHandler.GetInstance().CodeExceptions.FirstOrDefault(t => t.Key.Equals(code));
            CompositeFillErrors        cfe      = new CompositeFillErrors()
            {
                Field = rowerror.Value, Message = message
            };

            return(cfe);
        }
Exemplo n.º 2
0
        public override CompositeFillErrors Run(Exception ex)
        {
            int    code;
            string message = "";
            JsonHalExceptionClientHandler myex = (JsonHalExceptionClientHandler)ex.InnerException;

            code    = myex.ErrorCode;
            message = myex.ErrorDescription;
            KeyValuePair <int, string> rowerror = ClientCodeHandler.GetInstance().CodeExceptions.FirstOrDefault(t => t.Key.Equals(code));
            CompositeFillErrors        cfe      = new CompositeFillErrors()
            {
                Field = rowerror.Value, Message = message
            };

            return(cfe);
        }