This commit is contained in:
hyb1996
2017-07-31 21:49:27 +08:00
parent f51d791d98
commit f037a642fd
3 changed files with 6 additions and 5 deletions

View File

@@ -219,9 +219,9 @@ public class ProcessShell extends AbstractShell implements AutoCloseable {
if (successResult != null) successResult.close();
if (errorResult != null) errorResult.close();
} catch (IOException e) {
String errmsg = e.getMessage();
if (errmsg != null) {
Log.e(TAG, errmsg);
String errMsg = e.getMessage();
if (errMsg != null) {
Log.e(TAG, errMsg);
} else {
e.printStackTrace();
}

View File

@@ -246,9 +246,9 @@ public class Shell extends AbstractShell implements AutoCloseable {
mCallback.onOutput(new String(data, offset, count));
}
mOutputStream.write(data, offset, count);
} catch (IOException e) {
throw new UncheckedIOException(e);
e.printStackTrace();
finish();
}
}