Leonetienne/Hazelnupp
Simple, easy to use, command line parameter interface
HazelnuppException.h
Go to the documentation of this file.
1 #pragma once
2 #include <stdexcept>
3 
6 class HazelnuppException : public std::exception
7 {
8 public:
10  HazelnuppException(const std::string& msg) : message{ msg } {};
11 
13  const std::string& What() const
14  {
15  return message;
16  }
17 
18 protected:
19  std::string message;
20 };
21 
25 {
26 public:
28  HazelnuppInvalidKeyException(const std::string& msg) : HazelnuppException(msg) {};
29 };
30 
34 {
35 public:
37  HazelnuppValueNotConvertibleException(const std::string& msg) : HazelnuppException(msg) {};
38 };
39 
43 {
44 public:
46  HazelnuppConstraintException(const std::string& msg) : HazelnuppException(msg) {};
47 };
48 
52 {
53 public:
56 };
57 
61 {
62 public:
65 };
HazelnuppException::What
const std::string & What() const
Will return an error message.
Definition: HazelnuppException.h:13
HazelnuppConstraintMissingValue::HazelnuppConstraintMissingValue
HazelnuppConstraintMissingValue(const std::string &msg)
Definition: HazelnuppException.h:64
HazelnuppConstraintException
Gets thrown something bad happens because of parameter constraints.
Definition: HazelnuppException.h:42
HazelnuppConstraintTypeMissmatch::HazelnuppConstraintTypeMissmatch
HazelnuppConstraintTypeMissmatch(const std::string &msg)
Definition: HazelnuppException.h:55
HazelnuppInvalidKeyException::HazelnuppInvalidKeyException
HazelnuppInvalidKeyException(const std::string &msg)
Definition: HazelnuppException.h:28
HazelnuppException
Generic hazelnupp exception.
Definition: HazelnuppException.h:6
HazelnuppInvalidKeyException::HazelnuppInvalidKeyException
HazelnuppInvalidKeyException()
Definition: HazelnuppException.h:27
HazelnuppConstraintTypeMissmatch
Gets thrown when a parameter is of a type that does not match the required type, and is not convertib...
Definition: HazelnuppException.h:51
HazelnuppException::HazelnuppException
HazelnuppException(const std::string &msg)
Definition: HazelnuppException.h:10
HazelnuppConstraintMissingValue
Gets thrown when a parameter constrained to be required is not provided, and has no default value set...
Definition: HazelnuppException.h:60
HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:33
HazelnuppValueNotConvertibleException::HazelnuppValueNotConvertibleException
HazelnuppValueNotConvertibleException()
Definition: HazelnuppException.h:36
HazelnuppConstraintMissingValue::HazelnuppConstraintMissingValue
HazelnuppConstraintMissingValue()
Definition: HazelnuppException.h:63
HazelnuppConstraintException::HazelnuppConstraintException
HazelnuppConstraintException()
Definition: HazelnuppException.h:45
HazelnuppConstraintTypeMissmatch::HazelnuppConstraintTypeMissmatch
HazelnuppConstraintTypeMissmatch()
Definition: HazelnuppException.h:54
HazelnuppInvalidKeyException
Gets thrown when an non-existent key gets dereferenced.
Definition: HazelnuppException.h:24
HazelnuppConstraintException::HazelnuppConstraintException
HazelnuppConstraintException(const std::string &msg)
Definition: HazelnuppException.h:46
HazelnuppValueNotConvertibleException::HazelnuppValueNotConvertibleException
HazelnuppValueNotConvertibleException(const std::string &msg)
Definition: HazelnuppException.h:37
HazelnuppException::HazelnuppException
HazelnuppException()
Definition: HazelnuppException.h:9
HazelnuppException::message
std::string message
Definition: HazelnuppException.h:19