| Leonetienne/Hazelnupp Simple, easy to use, command line parameter interface

Public Member Functions | List of all members
Hazelnp::HazelnuppConstraintMissingValue Class Reference

Gets thrown when a parameter constrained to be required is not provided, and has no default value set. More...

`#include <HazelnuppException.h>`

Inheritance diagram for Hazelnp::HazelnuppConstraintMissingValue:
[legend]
Collaboration diagram for Hazelnp::HazelnuppConstraintMissingValue:
[legend]

## Public Member Functions
| HazelnuppConstraintMissingValue ()
| HazelnuppConstraintMissingValue (const std::string &key, const std::string &paramDescription="")
Public Member Functions inherited from Hazelnp::HazelnuppConstraintException
| HazelnuppConstraintException ()
| HazelnuppConstraintException (const std::string &msg)
Public Member Functions inherited from Hazelnp::HazelnuppException
| HazelnuppException ()
| HazelnuppException (const std::string &msg)
const std::string & | What () const
| Will return an error message. More...

## Additional Inherited Members
Protected Attributes inherited from Hazelnp::HazelnuppException
std::string | message

## Detailed Description

Gets thrown when a parameter constrained to be required is not provided, and has no default value set.

Definition at line 80 of file HazelnuppException.h.

## Constructor & Destructor Documentation

## ◆ HazelnuppConstraintMissingValue() [1/2]

Hazelnp::HazelnuppConstraintMissingValue::HazelnuppConstraintMissingValue | ( |  | ) |
| inline

Definition at line 83 of file HazelnuppException.h.

83 : HazelnuppConstraintException() {};

## ◆ HazelnuppConstraintMissingValue() [2/2]

Hazelnp::HazelnuppConstraintMissingValue::HazelnuppConstraintMissingValue | ( | const std::string & | key,
|  | const std::string & | paramDescription = `""`
| ) |  |
| inline

Definition at line 84 of file HazelnuppException.h.

85 {
86 // Generate descriptive error message
87 std::stringstream ss;
88 ss << "Missing required parameter " << key << ".";
89
90 // Add the parameter description, if provided
91 if (paramDescription.length() > 0)
92 ss << std::endl << key << " => " << paramDescription;
93
94 message = ss.str();
95 return;
96 };

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

- Hazelnupp/HazelnuppException.h

Hazelnp::HazelnuppConstraintException::HazelnuppConstraintException
HazelnuppConstraintException()
Definition: HazelnuppException.h:50
Hazelnp::HazelnuppException::message
std::string message
Definition: HazelnuppException.h:24