TrigonometricValueOutOfBoundException Class Reference

This class allows to manage exceptions due to a value out of Bound for a trigonometric function. More...

#include <TrigonometricValueOutOfBoundException.h>

Inherits ArithmeticException.

Inheritance diagram for TrigonometricValueOutOfBoundException:

Inheritance graph
[legend]
Collaboration diagram for TrigonometricValueOutOfBoundException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TrigonometricValueOutOfBoundException () throw ()
 Default constructor.
 TrigonometricValueOutOfBoundException (std::string sElementName, double dValue, double dValueMin, double dValueMax, std::string sFunctionName) throw ()
 This constructor requires 5 parameters :
  • the name of the element which is not in the trigonometric allowed bound
  • the bad value which is not compliant with the Bound of the trigonometric function
  • the minimal bound value of the trigonometric function
  • the maximal bound value of the trigonometric function
  • the name of the trigonometric function ModelId=43834ABD03A6.

 TrigonometricValueOutOfBoundException (std::string sElementName, double dValue, double dValueMin, double dValueMax, std::string sFunctionName, std::string sOrigin, std::string sFilename, unsigned int iLineNumber) throw ()
 This constructor requires 8 parameters :
  • the name of the element which is not in the trigonometric allowed Bound
  • the bad value which is not compliant with the bound of the trigonometric function
  • the minimal bound value of the trigonometric function
  • the maximal bound value of the trigonometric function
  • the name of the trigonometric function
  • the method which throw the exception
  • the name of the file where the exception was thrown
  • the line number in the file where the exception was thrown.

virtual ~TrigonometricValueOutOfBoundException () throw ()
 Destructor.
virtual std::string makeDescription ()
 The message provides by the trigonometric value out of Bound exception.
virtual std::string makeReason ()
 The reason message provides by the trigonometric value out of Bound exception.
virtual std::string makeOrigin (std::string sOrigin)
 The origin message provides by the trigonometric value out of Bound exception.

Private Attributes

std::string _sElementName
double _dValue
double _dValueMin
double _dValueMax
std::string _sFunctionName

Detailed Description

This class allows to manage exceptions due to a value out of Bound for a trigonometric function.

Definition at line 19 of file TrigonometricValueOutOfBoundException.h.


Constructor & Destructor Documentation

TrigonometricValueOutOfBoundException::TrigonometricValueOutOfBoundException  )  throw ()
 

Default constructor.

Definition at line 16 of file TrigonometricValueOutOfBoundException.cpp.

00017 {
00018 
00019 }

TrigonometricValueOutOfBoundException::TrigonometricValueOutOfBoundException std::string  sElementName,
double  dValue,
double  dValueMin,
double  dValueMax,
std::string  sFunctionName
throw ()
 

This constructor requires 5 parameters :

  • the name of the element which is not in the trigonometric allowed bound
  • the bad value which is not compliant with the Bound of the trigonometric function
  • the minimal bound value of the trigonometric function
  • the maximal bound value of the trigonometric function
  • the name of the trigonometric function ModelId=43834ABD03A6.

Definition at line 35 of file TrigonometricValueOutOfBoundException.cpp.

00035                                                                                                                                                                                      : _sElementName(sElementName),_dValue(dValue),_dValueMin(dValueMin),_dValueMax(dValueMax),_sFunctionName(sFunctionName)
00036 {               
00037                 setType("TrigonometricValueOutOfBoundException");
00038                 setLineNumber(0);
00039                 setFileName("");
00040                 
00041                 setDescription(makeDescription());
00042                 setReason(makeReason());
00043                 setOrigin("");
00044 
00045 }

TrigonometricValueOutOfBoundException::TrigonometricValueOutOfBoundException std::string  sElementName,
double  dValue,
double  dValueMin,
double  dValueMax,
std::string  sFunctionName,
std::string  sOrigin,
std::string  sFilename,
unsigned int  iLineNumber
throw ()
 

This constructor requires 8 parameters :

  • the name of the element which is not in the trigonometric allowed Bound
  • the bad value which is not compliant with the bound of the trigonometric function
  • the minimal bound value of the trigonometric function
  • the maximal bound value of the trigonometric function
  • the name of the trigonometric function
  • the method which throw the exception
  • the name of the file where the exception was thrown
  • the line number in the file where the exception was thrown.

ModelId=43834ABD03AC

Definition at line 58 of file TrigonometricValueOutOfBoundException.cpp.

00058                                                                                                                                                                                                                                                    : _sElementName(sElementName),_dValue(dValue),_dValueMin(dValueMin),_dValueMax(dValueMax),_sFunctionName(sFunctionName)
00059 {               
00060                 setType("TrigonometricValueOutOfBoundException");
00061                 setLineNumber(iLineNumber);
00062                 setFileName(sFilename);
00063                 
00064                 setDescription(makeDescription());
00065                 setReason(makeReason());
00066                 setOrigin(makeOrigin(sOrigin));
00067 }

TrigonometricValueOutOfBoundException::~TrigonometricValueOutOfBoundException  )  throw () [virtual]
 

Destructor.

Definition at line 23 of file TrigonometricValueOutOfBoundException.cpp.

00024 {
00025 
00026 }


Member Function Documentation

std::string TrigonometricValueOutOfBoundException::makeDescription  )  [virtual]
 

The message provides by the trigonometric value out of Bound exception.

Implements ArithmeticException.

Definition at line 72 of file TrigonometricValueOutOfBoundException.cpp.

References _dValue, _dValueMax, _dValueMin, _sElementName, _sFunctionName, and dtos().

00073 { 
00074         std::string     sExceptionMessage       =       "The value ";
00075                         sExceptionMessage       +=      dtos(_dValue);
00076                         sExceptionMessage       +=  " of the ";
00077                         sExceptionMessage       +=  _sElementName;
00078                         sExceptionMessage       +=      " variable must be in the allowed Bound [" ;
00079                         sExceptionMessage       +=      dtos(_dValueMin);
00080                         sExceptionMessage       +=      ","; 
00081                         sExceptionMessage       +=      dtos(_dValueMax);
00082                         sExceptionMessage       +=      "] for the function "; 
00083                         sExceptionMessage       +=      _sFunctionName;
00084         return sExceptionMessage;
00085 }

Here is the call graph for this function:

std::string TrigonometricValueOutOfBoundException::makeOrigin std::string  sOrigin  )  [virtual]
 

The origin message provides by the trigonometric value out of Bound exception.

Implements ArithmeticException.

Definition at line 99 of file TrigonometricValueOutOfBoundException.cpp.

References Exception::getFileName(), Exception::getLineNumber(), and ltos().

00100 {
00101         std::string     sOriginMessage = getFileName();
00102                         sOriginMessage+= " (l:";
00103                         sOriginMessage+= ltos(getLineNumber());
00104                         sOriginMessage+= ") ";
00105                         sOriginMessage+= sOrigin;
00106                         
00107         return sOriginMessage;
00108 }

Here is the call graph for this function:

std::string TrigonometricValueOutOfBoundException::makeReason  )  [virtual]
 

The reason message provides by the trigonometric value out of Bound exception.

Implements ArithmeticException.

Definition at line 89 of file TrigonometricValueOutOfBoundException.cpp.

References Exception::getType().

00090 {
00091         std::string     sReasonMessage = "DATA_OUT_OF_RANGE --> ";
00092                         sReasonMessage+= getType();
00093                         
00094         return sReasonMessage;
00095 }

Here is the call graph for this function:


Member Data Documentation

double TrigonometricValueOutOfBoundException::_dValue [private]
 

Definition at line 41 of file TrigonometricValueOutOfBoundException.h.

Referenced by makeDescription().

double TrigonometricValueOutOfBoundException::_dValueMax [private]
 

Definition at line 45 of file TrigonometricValueOutOfBoundException.h.

Referenced by makeDescription().

double TrigonometricValueOutOfBoundException::_dValueMin [private]
 

Definition at line 43 of file TrigonometricValueOutOfBoundException.h.

Referenced by makeDescription().

std::string TrigonometricValueOutOfBoundException::_sElementName [private]
 

Definition at line 39 of file TrigonometricValueOutOfBoundException.h.

Referenced by makeDescription().

std::string TrigonometricValueOutOfBoundException::_sFunctionName [private]
 

Definition at line 48 of file TrigonometricValueOutOfBoundException.h.

Referenced by makeDescription().


The documentation for this class was generated from the following files:
Generated on Fri Jul 10 10:32:39 2009 for Utils Library by  doxygen 1.4.5