Improve error message generated when calling argument() incorrectly.

This commit is contained in:
Davis King 2014-04-23 19:19:49 -04:00
parent 99342ca5be
commit 81a04634ed
1 changed files with 7 additions and 6 deletions

View File

@ -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()
); );