diff options
Diffstat (limited to 'java/demo/book/printer/Client.java')
-rwxr-xr-x | java/demo/book/printer/Client.java | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/java/demo/book/printer/Client.java b/java/demo/book/printer/Client.java index 20a98aa6536..9f373631dbb 100755 --- a/java/demo/book/printer/Client.java +++ b/java/demo/book/printer/Client.java @@ -14,31 +14,31 @@ public class Client { int status = 0; Ice.Communicator ic = null; try { - ic = Ice.Util.initialize(args); - Ice.ObjectPrx base = ic.stringToProxy( - "SimplePrinter:default -p 10000"); - Demo.PrinterPrx printer = Demo.PrinterPrxHelper.checkedCast(base); - if (printer == null) - throw new Error("Invalid proxy"); + ic = Ice.Util.initialize(args); + Ice.ObjectPrx base = ic.stringToProxy( + "SimplePrinter:default -p 10000"); + Demo.PrinterPrx printer = Demo.PrinterPrxHelper.checkedCast(base); + if (printer == null) + throw new Error("Invalid proxy"); - printer.printString("Hello World!"); + printer.printString("Hello World!"); } catch (Ice.LocalException e) { e.printStackTrace(); - status = 1; + status = 1; } catch (Exception e) { - System.err.println(e.getMessage()); - status = 1; - } - if (ic != null) { - // Clean up - // - try { - ic.destroy(); - } catch (Exception e) { - System.err.println(e.getMessage()); - status = 1; - } - } + System.err.println(e.getMessage()); + status = 1; + } + if (ic != null) { + // Clean up + // + try { + ic.destroy(); + } catch (Exception e) { + System.err.println(e.getMessage()); + status = 1; + } + } System.exit(status); } } |