TAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
TAP::argument_count_mismatch Class Reference

Exception class raised when an argument is used an incorrect amount of times. More...

#include <Exceptions.hpp>

Inheritance diagram for TAP::argument_count_mismatch:
TAP::argument_error TAP::exception

Public Member Functions

 argument_count_mismatch (const Argument &arg, unsigned int count, unsigned int expected)
 Creates the exception for the given argument, with the number of occurrences and the expected number of occurrences. More...
 
- Public Member Functions inherited from TAP::argument_error
 argument_error (const Argument &arg)
 Creates the exception for the given argument, without a specified reason. More...
 
 argument_error (const Argument &arg, const std::string &reason)
 Creates the exception for the given argument, with a specified reason. More...
 
const Argumentarg () const
 Returns the argument triggering the error. More...
 
- Public Member Functions inherited from TAP::exception
 exception (std::string what)
 Creates the exception with the given message. More...
 
 exception ()
 Creates the exception with no message.
 
const char * what () const noexceptoverride
 See std::exception::what().
 

Additional Inherited Members

- Protected Attributes inherited from TAP::argument_error
std::unique_ptr< Argumentm_arg
 Copy of the argument involved in the error.
 
- Protected Attributes inherited from TAP::exception
std::string m_what
 Description of the exception. More...
 

Detailed Description

Exception class raised when an argument is used an incorrect amount of times.

Constructor & Destructor Documentation

TAP::argument_count_mismatch::argument_count_mismatch ( const Argument arg,
unsigned int  count,
unsigned int  expected 
)
inline

Creates the exception for the given argument, with the number of occurrences and the expected number of occurrences.

If the expected value is higher, it is assumed to be a minimum, otherwise a maximum.

Parameters
argThe argument with an error
countThe number of times the argument occurred
expectedThe number of times the argument was expected to occur

The documentation for this class was generated from the following file: