The error message is now included in the thrown exception.

This commit is contained in:
Samuel Carlsson 2014-03-18 21:33:18 +01:00
parent a872b5413e
commit 5723a7ce27

View File

@ -31,7 +31,11 @@ class Transport {
public void verifyResponse() throws IOException, JadbException {
String response = readString(4);
if ("OKAY".equals(response) == false) throw new JadbException("command failed");
if ("OKAY".equals(response) == false)
{
String error = readString();
throw new JadbException("command failed: " + error);
}
}
public String readString(int length) throws IOException {