X-Git-Url: http://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=blobdiff_plain;f=org.argeo.api.cli%2Fsrc%2Forg%2Fargeo%2Fapi%2Fcli%2FCommandRuntimeException.java;fp=org.argeo.api.cli%2Fsrc%2Forg%2Fargeo%2Fapi%2Fcli%2FCommandRuntimeException.java;h=0000000000000000000000000000000000000000;hp=52c033433d69343736eec3d6b14ad1f6f558fb41;hb=b95462873703848193e56fcbe997693630db6121;hpb=55d88fba80cec198a0f11ba7545e19878c51fc5e diff --git a/org.argeo.api.cli/src/org/argeo/api/cli/CommandRuntimeException.java b/org.argeo.api.cli/src/org/argeo/api/cli/CommandRuntimeException.java deleted file mode 100644 index 52c033433..000000000 --- a/org.argeo.api.cli/src/org/argeo/api/cli/CommandRuntimeException.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.argeo.api.cli; - -import java.util.List; - -/** {@link RuntimeException} referring during a command run. */ -public class CommandRuntimeException extends RuntimeException { - private static final long serialVersionUID = 5595999301269377128L; - - private final DescribedCommand command; - private final List arguments; - - public CommandRuntimeException(Throwable e, DescribedCommand command, List arguments) { - this(null, e, command, arguments); - } - - public CommandRuntimeException(String message, DescribedCommand command, List arguments) { - this(message, null, command, arguments); - } - - public CommandRuntimeException(String message, Throwable e, DescribedCommand command, List arguments) { - super(message == null ? "(" + command.getClass().getName() + " " + arguments.toString() + ")" - : message + " (" + command.getClass().getName() + " " + arguments.toString() + ")", e); - this.command = command; - this.arguments = arguments; - } - - public DescribedCommand getCommand() { - return command; - } - - public List getArguments() { - return arguments; - } - -}