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,10 +169,11 @@ 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\tname(): " << narrow(name())
|
||||||
<< "\n\tcount(): " << count()
|
<< "\n\tcount(): " << count()
|
||||||
<< "\n\tnumber_of_arguments(): " << number_of_arguments()
|
<< "\n\tnumber_of_arguments(): " << number_of_arguments()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue