funcy  1.6.1
Public Member Functions | List of all members
funcy::OutOfDomainException Class Reference

Exception for scalar function arguments that are outside the domain of the function. More...

#include <exceptions.h>

Inheritance diagram for funcy::OutOfDomainException:
Inheritance graph
[legend]
Collaboration diagram for funcy::OutOfDomainException:
Collaboration graph
[legend]

Public Member Functions

template<class Value , class = std::enable_if_t< std::is_arithmetic< Value >::value >>
 OutOfDomainException (const std::string &function, const std::string &range, const Value &value, const std::string &file, const int line)
 Constructor. More...
 

Detailed Description

Exception for scalar function arguments that are outside the domain of the function.

Example:

if( x < 0 )
throw OutOfDomainException("[0,inf[","Sqrt" x,__FILE__,__LINE__);

Constructor & Destructor Documentation

◆ OutOfDomainException()

template<class Value , class = std::enable_if_t< std::is_arithmetic< Value >::value >>
funcy::OutOfDomainException::OutOfDomainException ( const std::string &  function,
const std::string &  range,
const Value &  value,
const std::string &  file,
const int  line 
)
inline

Constructor.

Parameters
rangestd::string that contains the mathematical expression for the valid range
functionname of the function throwing this exception
valuevalue outside range
filefile containing the throwing code
lineline containing the throwing code

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