diff --git a/gclc.system/src/main/java/net/bigeon/gclc/system/ForwardingRunnable.java b/gclc.system/src/main/java/net/bigeon/gclc/system/ForwardingRunnable.java index 595047d..96fdcdb 100644 --- a/gclc.system/src/main/java/net/bigeon/gclc/system/ForwardingRunnable.java +++ b/gclc.system/src/main/java/net/bigeon/gclc/system/ForwardingRunnable.java @@ -94,8 +94,7 @@ public final class ForwardingRunnable implements Runnable { * * @throws CommandRunException if the manager was closed while writing the * stream */ - private void readToEnd() - throws CommandRunException { + private void readToEnd() throws CommandRunException { int c; try { while ((c = is.read()) >= 0) { @@ -145,12 +144,20 @@ public final class ForwardingRunnable implements Runnable { return connect(stream, output, "Forwarding"); } - /** @return the error */ + /** Get the error in this runnable execution if any. + *
+ * In the current implementation, this error can be an {@link IOException} if + * the input stream failed or a {@link CommandRunException} if the output was + * closed. + * + * @return the error */ public synchronized Exception getError() { return error; } - /** @param error the error to set */ + /** Set the error that caused this runnable to stop executing. + * + * @param error the error to set */ private synchronized void setError(final Exception error) { this.error = error; }