Exit cleanly on Mininet errors.

Refs #4540

Change-Id: I7605c9740eca785e290e64e0d8a29339c92c7df2
diff --git a/bin/minindn b/bin/minindn
index 116fcf5..84b08d8 100755
--- a/bin/minindn
+++ b/bin/minindn
@@ -508,4 +508,14 @@
     options = parse_args()
 
     setLogLevel('info')
-    execute(options)
+
+    # No exceptions are raised in ndn presently, and Mininet relies
+    # on generic Exception. If this situation changes this may well
+    # need to be altered.
+    try:
+        execute(options)
+    except Exception as e:
+        print("Mininet Error: {}".format(e))
+        call(["nfd-stop"])
+        call(["sudo", "mn", "--clean"])
+        sys.exit(1)
\ No newline at end of file