We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpreter.tryConvert should set cause exception, so that stack trace shows the cause (which may be a custom converter).
Should be:
private Object tryConvert(ArgSpec argSpec, int index, ITypeConverter<?> converter, String value, Class<?> type) throws ParameterException { try { return converter.convert(value); } catch (TypeConversionException ex) { String msg = String.format("Invalid value for %s: %s", optionDescription("", argSpec, index), ex.getMessage()); throw new ParameterException(CommandLine.this, msg, ex, argSpec, value); } catch (Exception other) { String desc = optionDescription("", argSpec, index); String msg = String.format("Invalid value for %s: cannot convert '%s' to %s (%s)", desc, value, type.getSimpleName(), other); throw new ParameterException(CommandLine.this, msg, other, argSpec, value); } }
The text was updated successfully, but these errors were encountered:
de8bfca
No branches or pull requests
Interpreter.tryConvert should set cause exception, so that stack trace shows the cause (which may be a custom converter).
Should be:
The text was updated successfully, but these errors were encountered: