Add CommandException to abstract cli return codes for errors

This commit is contained in:
AsamK 2021-02-22 20:43:08 +01:00
parent c6395b9f35
commit 221d937eec
47 changed files with 538 additions and 572 deletions

View file

@ -1,23 +1,21 @@
package org.asamk.signal;
import java.io.IOException;
public interface PlainTextWriter {
void println(String format, Object... args) throws IOException;
void println(String format, Object... args);
PlainTextWriter indentedWriter();
default void println() throws IOException {
default void println() {
println("");
}
default void indent(final WriterConsumer subWriter) throws IOException {
default void indent(final WriterConsumer subWriter) {
subWriter.consume(indentedWriter());
}
interface WriterConsumer {
void consume(PlainTextWriter writer) throws IOException;
void consume(PlainTextWriter writer);
}
}