import org.asamk.signal.commands.RegistrationCommand;
import org.asamk.signal.commands.SignalCreator;
import org.asamk.signal.commands.exceptions.CommandException;
+import org.asamk.signal.commands.exceptions.IOErrorException;
import org.asamk.signal.commands.exceptions.UnexpectedErrorException;
import org.asamk.signal.commands.exceptions.UserErrorException;
import org.asamk.signal.manager.Manager;
+ e.getMessage()
+ " ("
+ e.getClass().getSimpleName()
- + ")");
+ + ")", e);
}
try (var m = manager) {
command.handleCommand(ns, m);
} catch (NotRegisteredException e) {
throw new UserErrorException("User " + username + " is not registered.");
} catch (Throwable e) {
- logger.debug("Loading state file failed", e);
throw new UnexpectedErrorException("Error loading state file for user "
+ username
+ ": "
+ e.getMessage()
+ " ("
+ e.getClass().getSimpleName()
- + ")");
+ + ")", e);
}
try {
manager.checkAccountState();
} catch (IOException e) {
- throw new UnexpectedErrorException("Error while checking account " + username + ": " + e.getMessage());
+ throw new IOErrorException("Error while checking account " + username + ": " + e.getMessage(), e);
}
return manager;
}
} catch (DBusException | IOException e) {
logger.error("Dbus client failed", e);
- throw new UnexpectedErrorException("Dbus client failed");
+ throw new UnexpectedErrorException("Dbus client failed", e);
}
}