diff options
Diffstat (limited to 'java/demo/Ice/hello/Server.java')
-rw-r--r-- | java/demo/Ice/hello/Server.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/java/demo/Ice/hello/Server.java b/java/demo/Ice/hello/Server.java index e8a3e3afa4c..c3a0d9b0e3c 100644 --- a/java/demo/Ice/hello/Server.java +++ b/java/demo/Ice/hello/Server.java @@ -37,12 +37,20 @@ public class Server { ex.printStackTrace(); status = 1; - } finally { - if(communicator != null) - { - communicator.destroy(); - } - } + } + + if(communicator != null) + { + try + { + communicator.destroy(); + } + catch(Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + } System.exit(status); } |