From c20d5a3b458b53ca20922edf98ceebb75399c00a Mon Sep 17 00:00:00 2001 From: chenlw <874313221@qq.com> Date: Mon, 10 Oct 2016 14:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E8=AE=B0=E5=BD=95=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E7=9A=84=E5=85=B7=E4=BD=93=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/base/CustomException.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/com/base/CustomException.java b/src/com/base/CustomException.java index e59bb6bd..d9b8ab73 100644 --- a/src/com/base/CustomException.java +++ b/src/com/base/CustomException.java @@ -2,9 +2,13 @@ package com.base; +import java.beans.IntrospectionException; +import java.lang.reflect.InvocationTargetException; + import org.apache.log4j.Logger; import com.platform.controller.DataModelController; +import com.platform.utils.Bean2MapUtils; import com.platform.utils.Configs; /** @@ -83,9 +87,17 @@ public class CustomException extends Exception { for (int i = 0; i < forSize; i++) { sbuf.append(array[i]); sbuf.append("\r\n"); + try { + sbuf.append(Bean2MapUtils.convertBean(array[i])); + sbuf.append("\r\n"); + } catch (IllegalAccessException | InvocationTargetException + | IntrospectionException e1) { + } + } + if (forSize == Constant.CustomException_log_object_size) { + sbuf.append("......"); + sbuf.append("\r\n"); } - sbuf.append("......"); - sbuf.append("\r\n"); } else { sbuf.append("null");