[program_options] multiple_occurrences exception

View: New views
4 Messages — Rating Filter:   Alert me  

[program_options] multiple_occurrences exception

by Sam Miller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is there a way to determine which option triggers the multiple_occurences
exception to be thrown when calling program_options::store?  As an example
I have a component that takes a positional --exe argument.  It would be
nice to know when the exception is throw if --exe had been specified
earlier in the command line.

Thanks,
Sam

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: [program_options] multiple_occurrences exception

by Vladimir Prus-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sam Miller wrote:

>
> Is there a way to determine which option triggers the multiple_occurences
> exception to be thrown when calling program_options::store?  As an example
> I have a component that takes a positional --exe argument.  It would be
> nice to know when the exception is throw if --exe had been specified
> earlier in the command line.

Sam,

I am afraid this is not presently possible.

- Volodya


_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: [program_options] multiple_occurrences exception

by Sascha Ochsenknecht-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sam Miller schrieb:
> Is there a way to determine which option triggers the multiple_occurences
> exception to be thrown when calling program_options::store?  

There are already Tickets for this issue:
https://svn.boost.org/trac/boost/ticket/1274
https://svn.boost.org/trac/boost/ticket/3423

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: [program_options] multiple_occurrences exception

by Vladimir Prus-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sascha Ochsenknecht wrote:

> Sam Miller schrieb:
>> Is there a way to determine which option triggers the multiple_occurences
>> exception to be thrown when calling program_options::store?
>
> There are already Tickets for this issue:
> https://svn.boost.org/trac/boost/ticket/1274
> https://svn.boost.org/trac/boost/ticket/3423

Indeed. I have closed the first one as duplicate, because the second one
is more complete.

- Volodya




_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users