The default error handle.
More...
#include <ArgFilter.h>
|
| DefaultErrorHandle () |
| Construct a new object.
|
|
std::string | badDatatype (int position, const std::string &data, datatype expectedType) override |
| Called when the data cannot be parsed to the expected datatype. More...
|
|
std::string | noParam (int position, const std::string &lastFlag, datatype expectedType) override |
| Called when the flag was configured to accept a parameter, but instead hit the end of the commands list. More...
|
|
std::string | badFlag (int position, const std::string &badFlag) override |
| Called when the given flag does not exist. More...
|
|
std::string | tooManyArgs (int position, unsigned int max) override |
| Called when there are too many array arguments. More...
|
|
std::string | internalError (int position, const std::string &errMsg) override |
| Called when some internal error occurred. More...
|
|
bool | doFailfast () override |
| Check if the ArgFilter should stop processing the commands as soon as it encounters and error. More...
|
|
bool | doFail () override |
| Check if the Shell should not execute the command if there was an error parsing the commands. More...
|
|
◆ badDatatype()
std::string etm::ArgFilter::DefaultErrorHandle::badDatatype |
( |
int |
position, |
|
|
const std::string & |
data, |
|
|
datatype |
expectedType |
|
) |
| |
|
overridevirtual |
Called when the data cannot be parsed to the expected datatype.
- Parameters
-
[in] | position | The argument position (with 0 being the invokation) |
[in] | data | The parameter given |
[in] | expectedType | The type data was expected to be |
- Returns
- String to display to the user
Implements etm::ArgFilter::ErrorHandle.
◆ badFlag()
std::string etm::ArgFilter::DefaultErrorHandle::badFlag |
( |
int |
position, |
|
|
const std::string & |
badFlag |
|
) |
| |
|
overridevirtual |
Called when the given flag does not exist.
- Parameters
-
[in] | position | The argument position (with 0 being the invokation) |
[in] | badFlag | The flag |
- Returns
- String to display to the user
Implements etm::ArgFilter::ErrorHandle.
◆ doFail()
bool etm::ArgFilter::DefaultErrorHandle::doFail |
( |
| ) |
|
|
overridevirtual |
◆ doFailfast()
bool etm::ArgFilter::DefaultErrorHandle::doFailfast |
( |
| ) |
|
|
overridevirtual |
◆ internalError()
std::string etm::ArgFilter::DefaultErrorHandle::internalError |
( |
int |
position, |
|
|
const std::string & |
errMsg |
|
) |
| |
|
overridevirtual |
Called when some internal error occurred.
This should never happen, but it's good to have some way to handle it if it does.
- Parameters
-
[in] | position | The argument position (with 0 being the invokation) |
[in] | errMsg | The error message |
- Returns
- String to display to the user
Implements etm::ArgFilter::ErrorHandle.
◆ noParam()
std::string etm::ArgFilter::DefaultErrorHandle::noParam |
( |
int |
position, |
|
|
const std::string & |
lastFlag, |
|
|
datatype |
expectedType |
|
) |
| |
|
overridevirtual |
Called when the flag was configured to accept a parameter, but instead hit the end of the commands list.
- Parameters
-
[in] | position | The argument position (with 0 being the invokation) |
[in] | lastFlag | The last flag, the one that the parameter was for |
[in] | expectedType | The type data was expected to be |
- Returns
- String to display to the user
Implements etm::ArgFilter::ErrorHandle.
◆ tooManyArgs()
std::string etm::ArgFilter::DefaultErrorHandle::tooManyArgs |
( |
int |
position, |
|
|
unsigned int |
max |
|
) |
| |
|
overridevirtual |
Called when there are too many array arguments.
- Parameters
-
[in] | position | The argument position (with 0 being the invokation) |
[in] | max | The max allowed args |
- Returns
- String to display to the user
Implements etm::ArgFilter::ErrorHandle.
The documentation for this class was generated from the following file: