Package com.sun.identity.cli
Class CLIException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.sun.identity.cli.CLIException
-
- All Implemented Interfaces:
Serializable
public class CLIException extends Exception
Commandline Interface Exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CLIException(String message, int exitCode)Constructs a CLI Exception.CLIException(String message, int exitCode, String subcommandName)Constructs a CLI Exception.CLIException(Throwable cause, int exitCode)Constructs a CLI Exception.CLIException(Throwable cause, int exitCode, String subcommandName)Constructs a CLI Exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetExitCode()Returns exit code.StringgetL10NMessage(Locale locale)Returns localized message.StringgetSubcommandName()Returns sub command name.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
CLIException
public CLIException(String message, int exitCode, String subcommandName)
Constructs a CLI Exception.- Parameters:
message- Exception message.exitCode- Exit code.subcommandName- Sub Command Name.
-
CLIException
public CLIException(String message, int exitCode)
Constructs a CLI Exception.- Parameters:
message- Exception message.exitCode- Exit code.
-
CLIException
public CLIException(Throwable cause, int exitCode)
Constructs a CLI Exception.- Parameters:
cause- Throwable object.exitCode- Exit code.
-
-
Method Detail
-
getExitCode
public int getExitCode()
Returns exit code.- Returns:
- exit code.
-
getSubcommandName
public String getSubcommandName()
Returns sub command name.- Returns:
- sub command name.
-
-