|
@@ -3,7 +3,6 @@ using System.Collections.Concurrent;
|
|
|
using System.Diagnostics;
|
|
|
using System.Net;
|
|
|
using System.Text;
|
|
|
-using WCS.Core;
|
|
|
|
|
|
namespace ServiceCenter.WebApi
|
|
|
{
|
|
@@ -32,11 +31,11 @@ namespace ServiceCenter.WebApi
|
|
|
if (Results.ContainsKey(key))
|
|
|
{
|
|
|
var res = Results[key];
|
|
|
- if (res == null) throw new KnownException("接口调用中", LogLevel.Low);
|
|
|
+ if (res == null) throw new Exception("接口调用中");
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- if (!res.Succsess) throw new KnownException(res.Exception, LogLevel.Mid);
|
|
|
+ if (!res.Succsess) throw new Exception(res.Exception);
|
|
|
|
|
|
return (T)res.Data;
|
|
|
}
|
|
@@ -73,7 +72,7 @@ namespace ServiceCenter.WebApi
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- throw new KnownException("接口调用中", LogLevel.Low);
|
|
|
+ throw new Exception("接口调用中");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -97,7 +96,7 @@ namespace ServiceCenter.WebApi
|
|
|
{
|
|
|
var res = reader.ReadToEnd();
|
|
|
sw.Stop();
|
|
|
- if (sw.ElapsedMilliseconds > 500) Ltc.Log($"接口{url}调用耗时{sw.ElapsedMilliseconds}---------{JsonConvert.SerializeObject(res)}", LogLevel.Low, ErrorType.Kown);
|
|
|
+ //if (sw.ElapsedMilliseconds > 500) Ltc.Log($"接口{url}调用耗时{sw.ElapsedMilliseconds}---------{JsonConvert.SerializeObject(res)}", LogLevel.Low, ErrorType.Kown);
|
|
|
|
|
|
return res;
|
|
|
}
|