Replace exception.printStacktrace with write to log. 34/1134/1
authorAlissa Bonas <abonas@redhat.com>
Mon, 9 Sep 2013 14:16:38 +0000 (17:16 +0300)
committerAlissa Bonas <abonas@redhat.com>
Mon, 9 Sep 2013 14:16:38 +0000 (17:16 +0300)
Change-Id: I09768746f1789748c2f2f9efe8fae35e33610304
Signed-off-by: Alissa Bonas <abonas@redhat.com>
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/internal/ConnectionManager.java
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java

index e2d8f6b..9cbddbb 100644 (file)
@@ -363,7 +363,7 @@ public class ConnectionManager implements IConnectionManager, IConnectionListene
             else ci.println(this.getNodes(address).toString());
             return;
         } catch (UnknownHostException e) {
-            e.printStackTrace();
+           logger.error("An error occured",e);
         }
     }
 
index d7c4e5f..f4c7bd2 100644 (file)
@@ -313,7 +313,7 @@ public abstract class AbstractScheme {
         } catch (CacheConfigException cce) {
             log.error("\nCache configuration invalid - check cache mode");
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("An error occured",e);
         }
     }
 }
index 60330c1..dd89954 100644 (file)
@@ -1382,7 +1382,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
                         try {
                             map.put(s, new NodeConnector(entry.getValue()));
                         } catch (ConstructionException e) {
-                            e.printStackTrace();
+                            log.error("An error occured",e);
                         }
                     }
                 }
@@ -1444,7 +1444,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
                             try {
                                 map.put(s, new NodeConnector(entry.getValue()));
                             } catch (ConstructionException e) {
-                                e.printStackTrace();
+                                log.error("An error occured",e);
                             }
                         }
                         map.remove(name.getValue());
@@ -1481,7 +1481,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
                         try {
                             map.put(s, new NodeConnector(entry.getValue()));
                         } catch (ConstructionException e) {
-                            e.printStackTrace();
+                            log.error("An error occured",e);
                         }
                     }
                     map.remove(name.getValue());

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.