Esempio n. 1
0
 /// <summary>
 /// 有异常就抛出
 /// </summary>
 /// <param name="res"></param>
 public static void ThrowIfException(this HttpResult res)
 {
     if (!res.IsOk())
     {
         throw new Exception($"七牛服务器错误,返回数据:{res.ToJson()}");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 有异常就抛出
 /// </summary>
 /// <param name="res"></param>
 public static void ThrowIfException(this HttpResult res)
 {
     if (!res.IsOk())
     {
         throw new Exception($"七牛服务器错误,返回数据:{JsonConvert.SerializeObject(res)}");
     }
 }