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