Leosac  0.8.0
Open Source Access Control
Leosac::InvalidArgument Class Reference

A class to represents invalid argument exception in Leosac. More...

#include <InvalidArgument.hpp>

+ Inheritance diagram for Leosac::InvalidArgument:
+ Collaboration diagram for Leosac::InvalidArgument:

Public Member Functions

template<typename T >
 InvalidArgument (const std::string &arg_name, const T &arg_val, const std::string &what, const std::string &cond_str)
 The constructor takes multiple parameter in order to output an informative message. More...
 
- Public Member Functions inherited from LEOSACException
 LEOSACException (const std::string &message)
 
virtual ~LEOSACException ()
 
virtual const char * what () const noexcept final
 
const Leosac::Tools::Stacktracetrace () const
 Get the stacktrace associated with this exception. More...
 

Additional Inherited Members

- Protected Attributes inherited from LEOSACException
std::string message_
 

Detailed Description

A class to represents invalid argument exception in Leosac.

This class has the same meaning as std::invalid_argument but inherits from LEOSACException so it can carry additional information.

Check the constructor documentation for more.

Note
Generally, this exception class can be automatically thrown using the LEOSAC_ENFORCE_ARGUMENT macro.

Definition at line 41 of file InvalidArgument.hpp.

Constructor & Destructor Documentation

◆ InvalidArgument()

template<typename T >
Leosac::InvalidArgument::InvalidArgument ( const std::string &  arg_name,
const T &  arg_val,
const std::string &  what,
const std::string &  cond_str 
)
inline

The constructor takes multiple parameter in order to output an informative message.

Parameters
arg_nameWhich variable was invalid.
arg_valThe value of that variable.
whatAn human friendly description of the expectations.
cond_strThe string representation of the condition.

Definition at line 54 of file InvalidArgument.hpp.


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