mirror of https://github.com/davisking/dlib.git
Improve error message generated when calling argument() incorrectly.
This commit is contained in:
parent
99342ca5be
commit
81a04634ed
|
@ -169,12 +169,13 @@ namespace dlib
|
||||||
// make sure requires clause is not broken
|
// make sure requires clause is not broken
|
||||||
DLIB_CASSERT( N < count() && arg < number_of_arguments(),
|
DLIB_CASSERT( N < count() && arg < number_of_arguments(),
|
||||||
"\tconst string_type& cmd_line_parser_option::argument(unsigned long,unsigned long)"
|
"\tconst string_type& cmd_line_parser_option::argument(unsigned long,unsigned long)"
|
||||||
<< "\n\tsee the requires clause of argument()"
|
<< "\n\tInvalid arguments were given to this function."
|
||||||
<< "\n\tthis: " << this
|
<< "\n\tthis: " << this
|
||||||
<< "\n\tN: " << N
|
<< "\n\tN: " << N
|
||||||
<< "\n\targ: " << arg
|
<< "\n\targ: " << arg
|
||||||
<< "\n\tcount(): " << count()
|
<< "\n\tname(): " << narrow(name())
|
||||||
<< "\n\tnumber_of_arguments(): " << number_of_arguments()
|
<< "\n\tcount(): " << count()
|
||||||
|
<< "\n\tnumber_of_arguments(): " << number_of_arguments()
|
||||||
);
|
);
|
||||||
|
|
||||||
return options[N][arg];
|
return options[N][arg];
|
||||||
|
|
Loading…
Reference in New Issue