From: Thanh Ha Date: Thu, 27 Nov 2014 20:22:54 +0000 (-0500) Subject: Handle more specific BindException and IOException X-Git-Tag: release/lithium~812^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=594885b1c0800a4e9fb9588ac964b421a1906365;hp=594885b1c0800a4e9fb9588ac964b421a1906365;ds=sidebyside Handle more specific BindException and IOException It is good pratice to handle specific exceptions rather than using the catch all generic Exception. This code change handles the java.net.BindException such that if an port is already in use we skip creating the simulated device on that port. IOException will display the failure message and exception and not cause additional attempts. Change-Id: I7cbf3aa7016b0589f8fdd3f6476006954068a9a0 Signed-off-by: Thanh Ha ---