Browse Source

[client] detect when resource is not available

master
giomba 3 years ago
parent
commit
a1149cdab4
  1. 4
      client/src/netpp/client/Main.java

4
client/src/netpp/client/Main.java

@ -35,6 +35,10 @@ public class Main {
CoapResponse response = null;
try {
response = client.get();
if (!response.isSuccess()) {
System.err.println("[E] can not access resource");
System.exit(1);
}
} catch (ConnectorException | IOException e) {
e.printStackTrace();
System.exit(1);

Loading…
Cancel
Save