mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Add CommandException to abstract cli return codes for errors
This commit is contained in:
parent
c6395b9f35
commit
221d937eec
47 changed files with 538 additions and 572 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue