dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03412
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1147: Made the DeleteNotAllowedException a bit more informative
------------------------------------------------------------
revno: 1147
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-12-01 15:39:12 +0100
message:
Made the DeleteNotAllowedException a bit more informative
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DeleteNotAllowedException.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/OptionsCategoriesDefaultSortOrderPopulator.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-api/src/main/java/org/hisp/dhis/common/DeleteNotAllowedException.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DeleteNotAllowedException.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DeleteNotAllowedException.java 2009-12-01 14:39:12 +0000
@@ -36,13 +36,15 @@
{
public static final String ERROR_ASSOCIATED_BY_OTHER_OBJECTS = "Object associated by other objects";
+ private static final String SEPARATOR = "-";
+
private String errorCode;
private String className;
public DeleteNotAllowedException( String errorCode, String className )
{
- super( errorCode );
+ super( errorCode + SEPARATOR + className );
this.errorCode = errorCode;
this.className = className;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/OptionsCategoriesDefaultSortOrderPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/OptionsCategoriesDefaultSortOrderPopulator.java 2009-10-30 13:22:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/OptionsCategoriesDefaultSortOrderPopulator.java 2009-12-01 14:39:12 +0000
@@ -68,6 +68,9 @@
@Transactional
public void execute()
{
+ executeSql( "drop table columnorder" );
+ executeSql( "drop table roworder" );
+
//categories_categoryoptions
int c1 = executeSql( "UPDATE categories_categoryoptions SET sort_order=0 WHERE sort_order is NULL OR sort_order=0" ); // set to 0 temporarily
if ( c1 > 0 )