You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/07/31 09:47:06 UTC

[GitHub] [fineract] xurror opened a new pull request #1218: FINERACT-1098 - Catch JpaSystemException in jpa transactions

xurror opened a new pull request #1218:
URL: https://github.com/apache/fineract/pull/1218


   https://issues.apache.org/jira/browse/FINERACT-1098


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] xurror commented on pull request #1218: FINERACT-1098 - Catch JpaSystemException in jpa transactions

Posted by GitBox <gi...@apache.org>.
xurror commented on pull request #1218:
URL: https://github.com/apache/fineract/pull/1218#issuecomment-667456042


   /rebase


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] xurror commented on a change in pull request #1218: FINERACT-1098 - Catch JpaSystemException in jpa transactions

Posted by GitBox <gi...@apache.org>.
xurror commented on a change in pull request #1218:
URL: https://github.com/apache/fineract/pull/1218#discussion_r464361531



##########
File path: fineract-provider/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java
##########
@@ -142,8 +144,7 @@ public CommandProcessingResult deleteGLClosure(final Long glClosureId) {
      * @param command
      * @param dve
      */
-    private void handleGLClosureIntegrityIssues(final JsonCommand command, final DataIntegrityViolationException dve) {
-        final Throwable realCause = dve.getMostSpecificCause();
+    private void handleGLClosureIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) {

Review comment:
       @vorburger instead NestedRuntimeException I used NonTransientDataAccessException which is a more suited super class.
   You can check this and if it's LGTY you can merge.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] vorburger commented on a change in pull request #1218: FINERACT-1098 - Catch JpaSystemException in jpa transactions

Posted by GitBox <gi...@apache.org>.
vorburger commented on a change in pull request #1218:
URL: https://github.com/apache/fineract/pull/1218#discussion_r463953157



##########
File path: fineract-provider/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java
##########
@@ -142,8 +144,7 @@ public CommandProcessingResult deleteGLClosure(final Long glClosureId) {
      * @param command
      * @param dve
      */
-    private void handleGLClosureIntegrityIssues(final JsonCommand command, final DataIntegrityViolationException dve) {
-        final Throwable realCause = dve.getMostSpecificCause();
+    private void handleGLClosureIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve) {

Review comment:
       @xurror it's not super important, but I thought perhaps this code review feedback could interest you: Instead of changing this like you have, what you really want to do in a case like this is just use the common super class of `JpaSystemException` and `DataIntegrityViolationException` like suggested below, does this make sense? Do you want to change this like that? It makes the code easier to read.
   
   ```suggestion
       private void handleGLClosureIntegrityIssues(final JsonCommand command, final NestedRuntimeException dve) {
           final Throwable realCause = dve.getMostSpecificCause();
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] xurror merged pull request #1218: FINERACT-1098 - Catch JpaSystemException in jpa transactions

Posted by GitBox <gi...@apache.org>.
xurror merged pull request #1218:
URL: https://github.com/apache/fineract/pull/1218


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [fineract] xurror commented on pull request #1218: FINERACT-1098 - Catch JpaSystemException in jpa transactions

Posted by GitBox <gi...@apache.org>.
xurror commented on pull request #1218:
URL: https://github.com/apache/fineract/pull/1218#issuecomment-668630299


   Merging this so I can continue with migration.


----------------------------------------------------------------
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:
users@infra.apache.org