killbill-uncached

Naive exception handling broke tests - this is the fix, though

11/30/2011 7:45:08 PM

Details

diff --git a/entitlement/src/main/java/com/ning/billing/entitlement/api/user/Subscription.java b/entitlement/src/main/java/com/ning/billing/entitlement/api/user/Subscription.java
index 396838e..521c89b 100644
--- a/entitlement/src/main/java/com/ning/billing/entitlement/api/user/Subscription.java
+++ b/entitlement/src/main/java/com/ning/billing/entitlement/api/user/Subscription.java
@@ -553,19 +553,30 @@ public class Subscription extends PrivateFields  implements ISubscription {
                         cur.getType()));
             }
             
-            //TODO: Correctly handle exception
+            //TODO: Correctly handle exceptions
             IPlan previousPlan = null;
             IPlanPhase previousPhase = null;
             IPlan nextPlan = null;
             IPlanPhase nextPhase = null;
             try {
             	previousPlan = catalog.findPlan(previousPlanName);
+            } catch (CatalogApiException e) {
+            	// TODO: handle exception
+            }
+            try {
             	previousPhase = catalog.findPhase(previousPhaseName);
+            } catch (CatalogApiException e) {
+                // TODO: handle exception
+			}
+            try {
             	nextPlan = catalog.findPlan(nextPlanName);
+            } catch (CatalogApiException e) {
+            	// TODO: handle exception
+            }
+            try {
             	nextPhase = catalog.findPhase(nextPhaseName);
             } catch (CatalogApiException e) {
-            	// TODO Auto-generated catch block
-            	e.printStackTrace();
+            	// TODO: handle exception
             }
  
             SubscriptionTransition transition =