vorburger commented on a change in pull request #1079:
URL: https://github.com/apache/fineract/pull/1079#discussion_r447300913



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java
##########
@@ -30,18 +33,39 @@
 
     public PlatformDataIntegrityException(final String 
globalisationMessageCode, final String defaultUserMessage,
             final Object... defaultUserMessageArgs) {
+        super(findThrowableCause(defaultUserMessageArgs));
         this.globalisationMessageCode = globalisationMessageCode;
         this.defaultUserMessage = defaultUserMessage;
         this.parameterName = null;
-        this.defaultUserMessageArgs = defaultUserMessageArgs;
+        this.defaultUserMessageArgs = 
filterThrowableCause(defaultUserMessageArgs);
     }
 
     public PlatformDataIntegrityException(final String 
globalisationMessageCode, final String defaultUserMessage,
             final String parameterName, final Object... 
defaultUserMessageArgs) {
+        super(findThrowableCause(defaultUserMessageArgs));
         this.globalisationMessageCode = globalisationMessageCode;
         this.defaultUserMessage = defaultUserMessage;
         this.parameterName = parameterName;
-        this.defaultUserMessageArgs = defaultUserMessageArgs;
+        this.defaultUserMessageArgs = 
filterThrowableCause(defaultUserMessageArgs);
+    }
+
+    private static Throwable findThrowableCause(Object[] 
defaultUserMessageArgs) {

Review comment:
       @thesmallstar I did this, and much more in #1125 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to