
com.github.dakusui.cmd.exceptions.CommandException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commandrunner Show documentation
Show all versions of commandrunner Show documentation
Command line runner library for Java
package com.github.dakusui.cmd.exceptions;
/**
* An exception class to indicate an error is detected during command execution
*
* @author ukaihiroshi01
*/
public class CommandException extends Exception {
/**
* A serial version UID
*/
private static final long serialVersionUID = -6922904011955807848L;
/**
* Creates an object of this class.
*/
public CommandException() {
this((String)null);
}
/**
* Creates an object of this class.
* @param msg A message string to be set.
*/
public CommandException(String msg) {
super(msg);
}
/**
* Creates an object of this class.
* @param t
*/
public CommandException(Throwable t) {
this(null, t);
}
/**
* Creates an object of this class.
*
* @param msg A message string to be set.
* @param t
*/
public CommandException(String msg, Throwable t) {
super(msg != null ? msg + "(" + t.getMessage() + ")" : t.getMessage());
this.setStackTrace(t.getStackTrace());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy