예제 #1
0
 public static JsonErrorHandler GetInstance()
 {
     if (_instance == null)
     {
         _instance = new JsonErrorHandler();
     }
     return(_instance);
 }
예제 #2
0
        public override CompositeFillErrors Run(Exception ex)
        {
            int              code;
            string           message = "";
            JsonErrorHandler myex    = (JsonErrorHandler)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);
        }