#include <IllegalArgumentException.h>
Inherits Exception.
Inheritance diagram for IllegalArgumentException:


Public Member Functions | |
| IllegalArgumentException () throw () | |
| Default constructor. | |
| virtual | ~IllegalArgumentException () throw () |
| Destructor. | |
| virtual std::string | makeDescription () |
| The message provides by the index out of Bound exception. | |
| virtual std::string | makeReason () |
| The reason message provides by the index out of Bound exception. | |
| virtual std::string | makeOrigin (std::string sOrigin) |
| The origin message provides by the index out of Bound exception. | |
| IllegalArgumentException (std::string sElementName, std::string sOrigin, std::string sFileName, unsigned int iLineNumber, double dIndex, long iNumberOfArguments,...) | |
This constructor requires 7 parameters :
| |
Private Attributes | |
| std::string | _sElementName |
| double | _dIndex |
| long | _iNbArguments |
| std::vector< double > | _vArgumentsList |
Definition at line 20 of file IllegalArgumentException.h.
|
|
Default constructor.
Definition at line 16 of file IllegalArgumentException.cpp.
|
|
|
Destructor.
Definition at line 22 of file IllegalArgumentException.cpp.
|
|
||||||||||||||||||||||||||||||||
|
This constructor requires 7 parameters :
Definition at line 53 of file IllegalArgumentException.cpp. References _iNbArguments, _vArgumentsList, makeDescription(), makeOrigin(), makeReason(), Exception::setDescription(), Exception::setFileName(), Exception::setLineNumber(), Exception::setOrigin(), Exception::setReason(), and Exception::setType(). 00059 : 00060 _sElementName(sElementName),_dIndex(dIndex),_iNbArguments(iNumberOfArguments) 00061 { 00062 00063 va_list arg_list; 00064 va_start (arg_list,iNumberOfArguments); 00065 00066 for (int i=0;i<=_iNbArguments;i++) 00067 { 00068 double dVal = va_arg(arg_list,double); 00069 _vArgumentsList.push_back(dVal); 00070 } 00071 va_end (arg_list); 00072 00073 setLineNumber(iLineNumber); 00074 setFileName(sFileName); 00075 setType("IllegalArgumentException"); 00076 00077 setDescription(makeDescription()); 00078 setReason(makeReason()); 00079 setOrigin(makeOrigin(sOrigin)); 00080 }
Here is the call graph for this function: ![]() |
|
|
The message provides by the index out of Bound exception.
Implements Exception. Definition at line 84 of file IllegalArgumentException.cpp. References _dIndex, _iNbArguments, _sElementName, _vArgumentsList, and dtos(). Referenced by IllegalArgumentException(). 00085 { 00086 std::string sExceptionMessage = "The value entered "; 00087 sExceptionMessage += dtos(_dIndex); 00088 sExceptionMessage += " of the "; 00089 sExceptionMessage += _sElementName; 00090 sExceptionMessage += " variable must be one of the following values [" ; 00091 00092 for (int i=0;i<_iNbArguments-1;i++) 00093 { 00094 sExceptionMessage += dtos(_vArgumentsList[i]); 00095 sExceptionMessage += ";"; 00096 } 00097 00098 sExceptionMessage += dtos(_vArgumentsList[_iNbArguments-1]); 00099 sExceptionMessage += "]"; 00100 00101 return sExceptionMessage; 00102 }
Here is the call graph for this function: ![]() |
|
|
The origin message provides by the index out of Bound exception.
Implements Exception. Definition at line 114 of file IllegalArgumentException.cpp. References Exception::getFileName(), Exception::getLineNumber(), and ltos(). Referenced by IllegalArgumentException(). 00115 { 00116 std::string sOriginMessage = getFileName(); 00117 sOriginMessage+= " (l:"; 00118 sOriginMessage+= ltos(getLineNumber()); 00119 sOriginMessage+= ") "; 00120 sOriginMessage+= sOrigin; 00121 00122 return sOriginMessage; 00123 }
Here is the call graph for this function: ![]() |
|
|
The reason message provides by the index out of Bound exception.
Implements Exception. Definition at line 105 of file IllegalArgumentException.cpp. References Exception::getType(). Referenced by IllegalArgumentException(). 00106 { 00107 std::string sReasonMessage = "ILLEGAL_ARGUMENT --> "; 00108 sReasonMessage+= getType(); 00109 00110 return sReasonMessage; 00111 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 46 of file IllegalArgumentException.h. Referenced by makeDescription(). |
|
|
Definition at line 47 of file IllegalArgumentException.h. Referenced by IllegalArgumentException(), and makeDescription(). |
|
|
Definition at line 45 of file IllegalArgumentException.h. Referenced by makeDescription(). |
|
|
Definition at line 48 of file IllegalArgumentException.h. Referenced by IllegalArgumentException(), and makeDescription(). |
1.4.5