dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42506
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21724: Deletion handler, more informative exception message
------------------------------------------------------------
revno: 21724
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-01-14 13:59:29 +0100
message:
Deletion handler, more informative exception message
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java 2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java 2016-01-14 12:59:29 +0000
@@ -103,7 +103,8 @@
{
String hint = String.valueOf( allow );
- String message = handler.getClassName() + ( hint.isEmpty() ? hint : ( " (" + hint + ")" ) );
+ String message = "Could not delete due to association with another object: " +
+ handler.getClassName() + ( hint.isEmpty() ? hint : ( " (" + hint + ")" ) );
log.info( "Delete was not allowed by " + currentHandler + ": " + message );
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java 2016-01-07 13:14:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/CrudControllerAdvice.java 2016-01-14 12:59:29 +0000
@@ -83,7 +83,7 @@
@ExceptionHandler( { EncryptionOperationNotPossibleException.class } )
public void encryptionOperationNotPossibleException( EncryptionOperationNotPossibleException ex, HttpServletResponse response, HttpServletRequest request )
{
- webMessageService.send( WebMessageUtils.conflict( "Could not encrypt data. This indicates a problem in your setup. Please refer to the DHIS2 manual for setting up encryption." ), response, request );
+ webMessageService.send( WebMessageUtils.conflict( "Could not encrypt data, indicates a configuration issue" ), response, request );
}
@ExceptionHandler( { NotAuthenticatedException.class } )