Exemple #1
0
        /// <summary>
        ///     记录确认状态时候的信息
        /// </summary>
        /// <param name="exception"></param>
        /// <param name="url"></param>
        /// <param name="httpVerb"></param>
        /// <returns></returns>
        public static ExceptionData LogEnsureSuccessed(Exception exception, string url, HttpVerb httpVerb)
        {
            var ed = new ExceptionData {
                Exception = exception, Message = "确认Http状态码时异常"
            };

            ed.Data.Add("url", url);
            ed.Data.Add("httpverb", httpVerb.ToString());
            ed.Data.Add("type", "ensuresuccessed");
            return(ed);
        }
Exemple #2
0
        /// <summary>
        ///     记录确认状态时候的信息
        /// </summary>
        /// <param name="exception"></param>
        /// <param name="url"></param>
        /// <param name="httpVerb"></param>
        /// <returns></returns>
        public static ExceptionData LogRequestTimeout(Exception exception, string url, HttpVerb httpVerb)
        {
            var ed = new ExceptionData {
                Exception = exception, Message = "请求时候的超时异常"
            };

            ed.Data.Add("url", url);
            ed.Data.Add("httpverb", httpVerb.ToString());
            ed.Data.Add("type", "request");
            ed.Data.Add("errorType", "timeout");
            return(ed);
        }