Package io.simplesource.api
Class CommandError
- java.lang.Object
-
- io.simplesource.api.CommandError
-
public class CommandError extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandError.Reason
-
Method Summary
Modifier and Type Method Description StringgetMessage()The error message accessorCommandError.ReasongetReason()The reason value accessor.static CommandErrorof(CommandError.Reason reason, String msg)Construct aCommandErrorfrom aThrowable.static CommandErrorof(CommandError.Reason reason, Throwable throwable)Construct aCommandErrorfrom aThrowable.
-
-
-
Method Detail
-
of
public static CommandError of(CommandError.Reason reason, Throwable throwable)
Construct aCommandErrorfrom aThrowable.- Parameters:
reason- the reason valuethrowable- for more context- Returns:
- the constructed
CommandError
-
of
public static CommandError of(CommandError.Reason reason, String msg)
Construct aCommandErrorfrom aThrowable.- Parameters:
reason- the reason valuemsg- for more context- Returns:
- the constructed
CommandError
-
getReason
public CommandError.Reason getReason()
The reason value accessor.- Returns:
- the reason
-
getMessage
public String getMessage()
The error message accessor- Returns:
- the error message
-
-