public static JsonErrorHandler GetInstance() { if (_instance == null) { _instance = new JsonErrorHandler(); } return(_instance); }
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); }