diff --git a/examples/src/main/java/io/zenoh/ZInfo.java b/examples/src/main/java/io/zenoh/ZInfo.java index 4d4bdb5..90b8cb9 100644 --- a/examples/src/main/java/io/zenoh/ZInfo.java +++ b/examples/src/main/java/io/zenoh/ZInfo.java @@ -43,9 +43,6 @@ public Integer call() throws Exception { System.out.println("zid: " + info.zid()); System.out.println("routers zid: " + info.routersZid()); System.out.println("peers zid: " + info.peersZid()); - } catch (ZError e) { - System.err.println("Error during Zenoh operation: " + e.getMessage()); - return 1; } return 0; } diff --git a/examples/src/main/java/io/zenoh/ZLiveliness.java b/examples/src/main/java/io/zenoh/ZLiveliness.java index b1df3c2..04ff24c 100644 --- a/examples/src/main/java/io/zenoh/ZLiveliness.java +++ b/examples/src/main/java/io/zenoh/ZLiveliness.java @@ -46,10 +46,6 @@ public Integer call() throws Exception { while (true) { Thread.sleep(1000); } - - } catch (ZError e) { - System.err.println("Error during Zenoh operation: " + e.getMessage()); - return 1; } } diff --git a/examples/src/main/java/io/zenoh/ZPing.java b/examples/src/main/java/io/zenoh/ZPing.java index 76b3017..e9878ef 100644 --- a/examples/src/main/java/io/zenoh/ZPing.java +++ b/examples/src/main/java/io/zenoh/ZPing.java @@ -85,11 +85,7 @@ public Integer call() throws Exception { long rtt = samples.get(i); System.out.printf("%d bytes: seq=%d rtt=%dµs lat=%dµs%n", payloadSize, i, rtt, rtt / 2); } - } catch (ZError e) { - System.err.println("Error: " + e.getMessage()); - return 1; } - return 0; } diff --git a/examples/src/main/java/io/zenoh/ZPong.java b/examples/src/main/java/io/zenoh/ZPong.java index 580bd99..c8119a9 100644 --- a/examples/src/main/java/io/zenoh/ZPong.java +++ b/examples/src/main/java/io/zenoh/ZPong.java @@ -60,9 +60,6 @@ public Integer call() throws Exception { }); latch.await(); - } catch (ZError e) { - System.err.println("Error: " + e.getMessage()); - return 1; } return 0; } diff --git a/examples/src/main/java/io/zenoh/ZPub.java b/examples/src/main/java/io/zenoh/ZPub.java index 319772a..42b86ba 100644 --- a/examples/src/main/java/io/zenoh/ZPub.java +++ b/examples/src/main/java/io/zenoh/ZPub.java @@ -38,7 +38,7 @@ public class ZPub implements Callable { @Override - public Integer call() throws ZError { + public Integer call() throws ZError, InterruptedException { Zenoh.initLogFromEnvOr("error"); Config config = loadConfig(emptyArgs, configFile, connect, listen, noMulticastScouting, mode); @@ -72,9 +72,6 @@ public Integer call() throws ZError { } idx++; } - } catch (Exception e) { - System.err.println("Error: " + e.getMessage()); - return 1; } } diff --git a/examples/src/main/java/io/zenoh/ZPut.java b/examples/src/main/java/io/zenoh/ZPut.java index 1117206..720c8b4 100644 --- a/examples/src/main/java/io/zenoh/ZPut.java +++ b/examples/src/main/java/io/zenoh/ZPut.java @@ -49,11 +49,7 @@ public Integer call() throws Exception { } else { session.put(keyExpr, ZBytes.from(value)); } - } catch (ZError e) { - System.err.println("Error during Zenoh operation: " + e.getMessage()); - return 1; } - return 0; } diff --git a/examples/src/main/java/io/zenoh/ZSubThr.java b/examples/src/main/java/io/zenoh/ZSubThr.java index 670967e..9c3d6a7 100644 --- a/examples/src/main/java/io/zenoh/ZSubThr.java +++ b/examples/src/main/java/io/zenoh/ZSubThr.java @@ -47,9 +47,6 @@ public Integer call() throws Exception { Thread.sleep(1000); } } - } catch (ZError e) { - System.err.println("Error during Zenoh operation: " + e.getMessage()); - return 1; } return 0; }