You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following problem: my CLI application has commands accepting an argument, which I provide a class, ClusterID having a constructor taking a String, for parsing and validating the argument.
@Arguments(required = true, description = "Cluster ID ...")
public ClusterID cluster;
While this is working fine for the happy case, ClusterID's constructor would raise an exception with a proper message if something has failed.
I'd like to report that message to the user, but I get an io.airlift.airline.ParseOptionConversionException only, without the cause.
io.airlift.airline.ParseOptionConversionException: cluster: can not convert "098" to a ClusterID
at io.airlift.airline.TypeConverter.convert(TypeConverter.java:78)
at io.airlift.airline.Parser.parseArg(Parser.java:265)
at io.airlift.airline.Parser.parseArgs(Parser.java:255)
at io.airlift.airline.Parser.parse(Parser.java:70)
at io.airlift.airline.Cli.parse(Cli.java:121)
at io.airlift.airline.Cli.parse(Cli.java:108)
at io.airlift.airline.Cli.parse(Cli.java:103)
at Main.main(Main.java:53)
I'd appreciate TypeConverter.java#L75 would not ignore the Throwable but pass in on io.airlift.airline.ParseOptionConversionException as cause.
The text was updated successfully, but these errors were encountered:
I have the following problem: my CLI application has commands accepting an argument, which I provide a class, ClusterID having a constructor taking a String, for parsing and validating the argument.
While this is working fine for the happy case, ClusterID's constructor would raise an exception with a proper message if something has failed.
I'd like to report that message to the user, but I get an
io.airlift.airline.ParseOptionConversionException
only, without the cause.I'd appreciate TypeConverter.java#L75 would not ignore the Throwable but pass in on
io.airlift.airline.ParseOptionConversionException
as cause.The text was updated successfully, but these errors were encountered: