HermesCommon  3.0
Hermes::Exceptions::ValueException Class Reference

Numeric value is out of allowed range. More...

#include <exceptions.h>

+ Inheritance diagram for Hermes::Exceptions::ValueException:

Public Member Functions

 ValueException (const char *name, double value, double allowed)
 
 ValueException (const char *name, double value, double min, double max)
 
 ValueException (const char *name, std::string passed)
 String value is not supported.
 
double get_value () const
 
double get_allowed () const
 return allowed value of variable.
 
 ValueException (const ValueException &e)
 
- Public Member Functions inherited from Hermes::Exceptions::Exception
 Exception ()
 Init exception with default message.
 
 Exception (const Exception &e)
 
 Exception (const char *msg,...)
 
void print_msg () const
 print error message to stderr
 
virtual const char * what () const throw ()
 get pointer to error message
 
std::string info () const
 
const char * get_func_name () const
 

Additional Inherited Members

- Protected Attributes inherited from Hermes::Exceptions::Exception
std::stringstream message
 
char message_char [10000]
 To be compatible with what().
 

Detailed Description

Numeric value is out of allowed range.

Definition at line 174 of file exceptions.h.

Constructor & Destructor Documentation

Hermes::Exceptions::ValueException::ValueException ( const char *  name,
double  value,
double  allowed 
)

Value is greather or lower than allowed.

Parameters
[in]namename of variable
[in]valuevalue of variable
[in]allowedallowed value (maximum or minimum)

Definition at line 211 of file exceptions.cpp.

Hermes::Exceptions::ValueException::ValueException ( const char *  name,
double  value,
double  min,
double  max 
)

Value is out of range.

Parameters
[in]namename of variable.
[in]valuevalue of variable.
[in]minminimum allowed value.
[in]maxminimum allowed value.

Definition at line 221 of file exceptions.cpp.

Member Function Documentation

double Hermes::Exceptions::ValueException::get_value ( ) const
Returns
bad value of variable.

Definition at line 236 of file exceptions.cpp.


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