JSON返回错误代码(比如token_access相关操作中使用)。
Inheritance: WeixinException
Ejemplo n.º 1
0
        /// <summary>
        /// ErrorJsonResultException 日志
        /// </summary>
        /// <param name="ex"></param>
        public static void ErrorJsonResultExceptionLog(ErrorJsonResultException ex)
        {
            if (!Config.IsDebug)
            {
                return;
            }

            LogBegin("ErrorJsonResultException");
            Log(string.Format("URL:{0}", ex.Url));
            Log(string.Format("errcode:{0}", ex.JsonResult.errcode));
            Log(string.Format("errmsg:{0}", ex.JsonResult.errmsg));
            LogEnd();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// ErrorJsonResultException 日志
        /// </summary>
        /// <param name="ex"></param>
        public static void ErrorJsonResultExceptionLog(ErrorJsonResultException ex)
        {
            if (!Config.IsDebug)
            {
                return;
            }

            LogBegin("[[ErrorJsonResultException]]");
            LogBegin("ErrorJsonResultException");
            Log("AccessTokenOrAppId:{0}", ex.AccessTokenOrAppId ?? "null");
            Log("URL:{0}", ex.Url);
            Log("errcode:{0}", ex.JsonResult.errcode);
            Log("errmsg:{0}", ex.JsonResult.errmsg);

            if (OnWeixinExceptionFunc != null)
            {
                try
                {
                    OnWeixinExceptionFunc(ex);
                }
                catch
                {
                }
            }

            LogEnd();
        }