From b3d963b229e44ebb9211e78a671de02eba8b64a8 Mon Sep 17 00:00:00 2001 From: qian Date: Thu, 21 Dec 2023 11:02:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=BC=82=E5=B8=B8=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/Controller/SCP_ASK_CONTROLLER.cs | 17 +++++++++++++---- 北京北汽/Controller/SCP_ASN_CONTROLLER.cs | 15 ++++++++++++--- .../Controller/SCP_TB_PRICE_CONTROLLER.cs | 16 ++++++++++++---- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs index 71051bd..77b31d5 100644 --- a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs @@ -128,25 +128,34 @@ namespace CK.SCP.Controller _ret.State = ReturnStatus.Failed; _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()); } catch (ScpException ex) { _ret.State = ReturnStatus.Failed; _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)) { 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()); } 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) diff --git a/北京北汽/Controller/SCP_ASN_CONTROLLER.cs b/北京北汽/Controller/SCP_ASN_CONTROLLER.cs index 9f775a0..d7a1f60 100644 --- a/北京北汽/Controller/SCP_ASN_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASN_CONTROLLER.cs @@ -131,22 +131,31 @@ namespace CK.SCP.Controller _ret.State = ReturnStatus.Failed; _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()); } catch (ScpException ex) { _ret.State = ReturnStatus.Failed; _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)) { 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()); } 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) diff --git a/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs b/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs index 7f457db..5bbad8a 100644 --- a/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_TB_PRICE_CONTROLLER.cs @@ -247,25 +247,33 @@ namespace CK.SCP.Controller _ret.State = ReturnStatus.Failed; _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()); } catch (ScpException ex) { _ret.State = ReturnStatus.Failed; _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)) { 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()); } 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)