Class Common
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.aozan3.Common
-
public class Common extends Object
This class define common methods for CLI.- Since:
- 3.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
errorExit(Throwable e, String message)
Print error message to the user and exits the application.static void
errorExit(Throwable e, String message, boolean logMessage)
Print error message to the user and exits the application.static void
errorExit(Throwable e, String message, boolean logMessage, int exitCode)
Print error message to the user and exits the application.static void
errorExit(Throwable e, String message, int exitCode)
Print error message to the user and exits the application.static void
exit(int exitCode)
Exit the application.static void
showErrorMessageAndExit(String message)
Show a message and then exit.static void
showMessageAndExit(String message)
Show a message and then exit.
-
-
-
Method Detail
-
exit
public static void exit(int exitCode)
Exit the application.- Parameters:
exitCode
- exit code
-
errorExit
public static void errorExit(Throwable e, String message)
Print error message to the user and exits the application.- Parameters:
e
- Exceptionmessage
- message to show to the use
-
errorExit
public static void errorExit(Throwable e, String message, boolean logMessage)
Print error message to the user and exits the application.- Parameters:
e
- Exceptionmessage
- message to show to the uselogMessage
- true if message must be logged
-
errorExit
public static void errorExit(Throwable e, String message, int exitCode)
Print error message to the user and exits the application.- Parameters:
e
- Exceptionmessage
- message to show to the use
-
errorExit
public static void errorExit(Throwable e, String message, boolean logMessage, int exitCode)
Print error message to the user and exits the application.- Parameters:
e
- Exceptionmessage
- message to show to the uselogMessage
- true if message must be logged
-
showMessageAndExit
public static void showMessageAndExit(String message)
Show a message and then exit.- Parameters:
message
- the message to show
-
showErrorMessageAndExit
public static void showErrorMessageAndExit(String message)
Show a message and then exit.- Parameters:
message
- the message to show
-
-