aboutsummaryrefslogtreecommitdiff
path: root/examples/TestIvy.java
diff options
context:
space:
mode:
Diffstat (limited to 'examples/TestIvy.java')
-rw-r--r--examples/TestIvy.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/TestIvy.java b/examples/TestIvy.java
index 3ab0cc0..7bc96d0 100644
--- a/examples/TestIvy.java
+++ b/examples/TestIvy.java
@@ -45,7 +45,7 @@ class TestIvy extends Frame implements IvyApplicationListener,IvyMessageListener
regexp=tfRegex.getText();
tfBound.setText("Bound to: " +regexp);
regexp.trim();
- regexp_id = bus.bindMsg(regexp,TestIvy.this);
+ try { regexp_id = bus.bindMsg(regexp,TestIvy.this); } catch (IvyException ie) { }
tfRegex.setText("");
pack();
}
@@ -59,8 +59,11 @@ class TestIvy extends Frame implements IvyApplicationListener,IvyMessageListener
int count;
String tosend = tfSend.getText();
tfSend.setText("");
- count = bus.sendMsg(tosend);
- append("Sending '" + tosend + "' count " + count );
+ try { count = bus.sendMsg(tosend);
+ append("Sending '" + tosend + "' count " + count );
+ } catch (IvyException ie) {
+ append("*Error* cant't send " + tosend );
+ }
}
});
p.add(tfSend,BorderLayout.CENTER);
@@ -79,7 +82,7 @@ class TestIvy extends Frame implements IvyApplicationListener,IvyMessageListener
public void connect(IvyClient client) { append(client.getApplicationName() + " connected " ); }
public void disconnect(IvyClient client) { append(client.getApplicationName() + " disconnected " ); }
- public void die(IvyClient client, int id) { System.exit(0); }
+ public void die(IvyClient client, int id,String msgarg) { System.exit(0); }
public void directMessage(IvyClient client, int id, String arg) {
append(client.getApplicationName() + " direct Message "+ id + arg );
}