#include <SquareRootException.h>
Inherits ArithmeticException.
Inheritance diagram for SquareRootException:


Public Member Functions | |
| SquareRootException () throw () | |
| Default constructor. | |
| SquareRootException (std::string sElementName, double dValue) throw () | |
This constructor requires 2 parameters :
| |
| SquareRootException (std::string sElementName, double dValue, std::string sOrigin, std::string sFilename, unsigned int iLineNumber) throw () | |
This constructor requires 5 parameters :
| |
| virtual | ~SquareRootException () throw () |
| Destructor. | |
| virtual std::string | makeDescription () |
| The message provides by the square root exception. | |
| virtual std::string | makeReason () |
| The reason message provides by the square root exception. | |
| virtual std::string | makeOrigin (std::string sOrigin) |
| The origin message provides by the square root exception. | |
Private Attributes | |
| std::string | _sElementName |
| double | _dValue |
Definition at line 16 of file SquareRootException.h.
|
|
Default constructor.
Definition at line 15 of file SquareRootException.cpp.
|
|
||||||||||||
|
This constructor requires 2 parameters :
Definition at line 29 of file SquareRootException.cpp. 00029 : _sElementName(sElementName),_dValue(dValue) 00030 { 00031 setType("SquareRootException"); 00032 setLineNumber(0); 00033 setFileName(""); 00034 00035 setDescription(makeDescription()); 00036 setReason(makeReason()); 00037 setOrigin(""); 00038 00039 }
|
|
||||||||||||||||||||||||
|
This constructor requires 5 parameters :
Definition at line 48 of file SquareRootException.cpp. 00048 : _sElementName(sElementName),_dValue(dValue) 00049 { 00050 setType("SquareRootException"); 00051 setLineNumber(iLineNumber); 00052 setFileName(sFilename); 00053 00054 setDescription(makeDescription()); 00055 setReason(makeReason()); 00056 setOrigin(makeOrigin(sOrigin)); 00057 }
|
|
|
Destructor.
Definition at line 21 of file SquareRootException.cpp.
|
|
|
The message provides by the square root exception.
Implements ArithmeticException. Definition at line 61 of file SquareRootException.cpp. References _dValue, _sElementName, and dtos(). 00062 { 00063 std::string sExceptionMessage = "The value "; 00064 sExceptionMessage += dtos(_dValue); 00065 sExceptionMessage += " of the "; 00066 sExceptionMessage += _sElementName; 00067 sExceptionMessage += " variable must be positive"; 00068 return sExceptionMessage; 00069 }
Here is the call graph for this function: ![]() |
|
|
The origin message provides by the square root exception.
Implements ArithmeticException. Definition at line 81 of file SquareRootException.cpp. References Exception::getFileName(), Exception::getLineNumber(), and ltos(). 00082 { 00083 std::string sOriginMessage = getFileName(); 00084 sOriginMessage+= " (l:"; 00085 sOriginMessage+= ltos(getLineNumber()); 00086 sOriginMessage+= ") "; 00087 sOriginMessage+= sOrigin; 00088 00089 return sOriginMessage; 00090 }
Here is the call graph for this function: ![]() |
|
|
The reason message provides by the square root exception.
Implements ArithmeticException. Definition at line 72 of file SquareRootException.cpp. References Exception::getType(). 00073 { 00074 std::string sReasonMessage = "DATA_OUT_OF_RANGE --> "; 00075 sReasonMessage+= getType(); 00076 00077 return sReasonMessage; 00078 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 38 of file SquareRootException.h. Referenced by makeDescription(). |
|
|
Definition at line 36 of file SquareRootException.h. Referenced by makeDescription(). |
1.4.5