Commits

Anonymous committed 511c7b8

WW-2893 Replace printStackTrace with debug statements when conversion fails

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1881e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits e01c62b

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java

             try {
                 return tc.convertValue(context, target, member, property, value, toClass);
             } catch (Exception e) {
-                e.printStackTrace();
+                if (LOG.isDebugEnabled())
+                    LOG.debug("unable to convert value using type converter [#0]", e, tc.getClass().getName());
                 handleConversionException(context, property, value, target);
 
                 return TypeConverter.NO_CONVERSION_POSSIBLE;
                     LOG.debug("falling back to default type converter [" + defaultTypeConverter + "]");
                 return defaultTypeConverter.convertValue(context, target, member, property, value, toClass);
             } catch (Exception e) {
-                e.printStackTrace();
+                if (LOG.isDebugEnabled())
+                    LOG.debug("unable to convert value using type converter [#0]", e, defaultTypeConverter.getClass().getName());
                 handleConversionException(context, property, value, target);
 
                 return TypeConverter.NO_CONVERSION_POSSIBLE;
                     LOG.debug("falling back to Ognl's default type conversion");
                 return super.convertValue(value, toClass);
             } catch (Exception e) {
-                e.printStackTrace();
+                if (LOG.isDebugEnabled())
+                    LOG.debug("unable to convert value using type converter [#0]", e, super.getClass().getName());
                 handleConversionException(context, property, value, target);
 
                 return TypeConverter.NO_CONVERSION_POSSIBLE;