← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11891: Improved error user feedback on resource table generation

 

------------------------------------------------------------
revno: 11891
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-03 21:24:00 +0200
message:
  Improved error user feedback on resource table generation
modified:
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.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-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java	2013-08-23 16:00:30 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/scheduling/ResourceTableTask.java	2013-09-03 19:24:00 +0000
@@ -62,7 +62,15 @@
     {
         notifier.notify( taskId, "Generating resource tables" );
         
-        resourceTableService.generateAll();
+        try
+        {
+            resourceTableService.generateAll();
+        }
+        catch ( RuntimeException ex )
+        {
+            notifier.notify( taskId, NotificationLevel.ERROR, "Process failed: " + ex.getMessage(), true );
+            return;
+        }
         
         notifier.notify( taskId, NotificationLevel.INFO, "Resource tables generated", true );
     }