]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - src/org/argeo/cms/cli/CommandRuntimeException.java
1 package org
.argeo
.cms
.cli
;
5 /** {@link RuntimeException} referring during a command run. */
6 public class CommandRuntimeException
extends RuntimeException
{
7 private static final long serialVersionUID
= 5595999301269377128L;
9 private final DescribedCommand
<?
> command
;
10 private final List
<String
> arguments
;
12 public CommandRuntimeException(Throwable e
, DescribedCommand
<?
> command
, List
<String
> arguments
) {
13 this(null, e
, command
, arguments
);
16 public CommandRuntimeException(String message
, DescribedCommand
<?
> command
, List
<String
> arguments
) {
17 this(message
, null, command
, arguments
);
20 public CommandRuntimeException(String message
, Throwable e
, DescribedCommand
<?
> command
, List
<String
> arguments
) {
21 super(message
== null ?
"(" + command
.getClass().getName() + " " + arguments
.toString() + ")"
22 : message
+ " (" + command
.getClass().getName() + " " + arguments
.toString() + ")", e
);
23 this.command
= command
;
24 this.arguments
= arguments
;
27 public DescribedCommand
<?
> getCommand() {
31 public List
<String
> getArguments() {