Browse Source

获取异常信息

master
qian 11 months ago
parent
commit
b3d963b229
  1. 15
      北京北汽/Controller/SCP_ASK_CONTROLLER.cs
  2. 15
      北京北汽/Controller/SCP_ASN_CONTROLLER.cs
  3. 16
      北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs

15
北京北汽/Controller/SCP_ASK_CONTROLLER.cs

@ -128,25 +128,34 @@ namespace CK.SCP.Controller
_ret.State = ReturnStatus.Failed; _ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(ex); _ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.Message.ToString());
if (ex.InnerException != null)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.InnerException.Message.ToString());
}
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
} }
catch (ScpException ex) catch (ScpException ex)
{ {
_ret.State = ReturnStatus.Failed; _ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(ex); _ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString()); LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.Message.ToString());
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{ {
var inner = (UpdateException)ex.InnerException; var inner = (UpdateException)ex.InnerException;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", inner.Message.ToString());
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
} }
else else
{ {
if (ex.InnerException != null) throw ex.InnerException; if (ex.InnerException != null) {
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.InnerException.Message);
throw ex.InnerException;
}
} }
} }
catch (Exception e) catch (Exception e)

15
北京北汽/Controller/SCP_ASN_CONTROLLER.cs

@ -131,22 +131,31 @@ namespace CK.SCP.Controller
_ret.State = ReturnStatus.Failed; _ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(ex); _ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.ToString()); LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.Message);
if (ex.InnerException != null)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.InnerException.Message);
}
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
} }
catch (ScpException ex) catch (ScpException ex)
{ {
_ret.State = ReturnStatus.Failed; _ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(ex); _ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.ToString()); LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.Message);
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{ {
var inner = (UpdateException)ex.InnerException; var inner = (UpdateException)ex.InnerException;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", inner.Message);
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
} }
else else
{ {
if (ex.InnerException != null) throw ex.InnerException; if (ex.InnerException != null)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASN_CONTROLLER), "Get_V_TB_ASN_List", ex.InnerException.Message);
throw ex.InnerException;
}
} }
} }
catch (Exception e) catch (Exception e)

16
北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs

@ -247,25 +247,33 @@ namespace CK.SCP.Controller
_ret.State = ReturnStatus.Failed; _ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(ex); _ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.Message.ToString());
if (ex.InnerException != null)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.InnerException.Message.ToString());
}
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
} }
catch (ScpException ex) catch (ScpException ex)
{ {
_ret.State = ReturnStatus.Failed; _ret.State = ReturnStatus.Failed;
_ret.ErrorList.Add(ex); _ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.ToString()); LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.Message.ToString());
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{ {
var inner = (UpdateException)ex.InnerException; var inner = (UpdateException)ex.InnerException;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", inner.Message.ToString());
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
} }
else else
{ {
if (ex.InnerException != null) throw ex.InnerException; if (ex.InnerException != null)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_TB_PRICE_CONTROLLER), "Get_TB_PRICE_List", ex.InnerException.Message.ToString());
throw ex.InnerException;
}
} }
} }
catch (Exception e) catch (Exception e)

Loading…
Cancel
Save