mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Show better error message, if libunix-java.so is not available
Fixes #39
This commit is contained in:
parent
d89e93ad47
commit
d83e0526fb
1 changed files with 9 additions and 0 deletions
|
@ -88,6 +88,9 @@ public class Main {
|
|||
ts = (Signal) dBusConn.getRemoteObject(
|
||||
SIGNAL_BUSNAME, SIGNAL_OBJECTPATH,
|
||||
Signal.class);
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Missing native library dependency for dbus service: " + e.getMessage());
|
||||
return 1;
|
||||
} catch (DBusException e) {
|
||||
e.printStackTrace();
|
||||
if (dBusConn != null) {
|
||||
|
@ -350,6 +353,9 @@ public class Main {
|
|||
System.out.println();
|
||||
}
|
||||
});
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Missing native library dependency for dbus service: " + e.getMessage());
|
||||
return 1;
|
||||
} catch (DBusException e) {
|
||||
e.printStackTrace();
|
||||
return 1;
|
||||
|
@ -546,6 +552,9 @@ public class Main {
|
|||
conn = DBusConnection.getConnection(busType);
|
||||
conn.exportObject(SIGNAL_OBJECTPATH, m);
|
||||
conn.requestBusName(SIGNAL_BUSNAME);
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Missing native library dependency for dbus service: " + e.getMessage());
|
||||
return 1;
|
||||
} catch (DBusException e) {
|
||||
e.printStackTrace();
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue