Clean properly populationStatus when an exception is thrown

Change-Id: Ibcb54e6cfe5031ef2854e96d9933bb522241e998
diff --git a/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
index 7dfa632..149e837 100644
--- a/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
+++ b/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -281,6 +281,10 @@
             log.info("Completed all routing rule population. Total # of rules pushed : {}",
                     rulePopulator.getCounter());
             return;
+        } catch (Exception e) {
+            log.error("populateAllRoutingRules thrown an exception: {}",
+                      e.getMessage(), e);
+            populationStatus = Status.ABORTED;
         } finally {
             statusLock.unlock();
         }
@@ -413,6 +417,10 @@
                     rulePopulator.getCounter());
             return;
 
+        } catch (Exception e) {
+            log.error("populateSubnet thrown an exception: {}",
+                      e.getMessage(), e);
+            populationStatus = Status.ABORTED;
         } finally {
             statusLock.unlock();
         }
@@ -541,6 +549,10 @@
                 log.warn("Failed to repopulate the rules for link status change.");
                 return;
             }
+        } catch (Exception e) {
+            log.error("populateRoutingRulesForLinkStatusChange thrown an exception: {}",
+                      e.getMessage(), e);
+            populationStatus = Status.ABORTED;
         } finally {
             statusLock.unlock();
         }