@Override
    public int handleParseException(CommandLine.ParameterException ex, String[] args) {

        if (ex == null) {
            return ToolConstants.HYSCALE_SUCCESS_CODE;
        }
        String message = ex.getMessage();
        logger.error(message);

        if (ex.getCause() instanceof HyscaleException) {
            return ((HyscaleException) ex.getCause()).getCode();
        }
        CommandLine commandLine = ex.getCommandLine();
        PrintWriter writer = commandLine.getErr();
        writer.println(message);
        writer.println(commandLine.getUsageMessage());
        return ToolConstants.INVALID_INPUT_ERROR_CODE;
    }
Exception Handler for CommandLine Parameter Exception Handling.
Catches exception thrown IParameterExceptionHandler,
1.if cause is HyscaleException and returns hyscale error code.
2.else prints respective command usage.
workflow-controller/controller-service/src/main/java/io/hyscale/controller/exception/ParameterExceptionHandler.java