|
CoinUtils
trunk
|
Error Class thrown by an exception. More...
#include <CoinError.hpp>
Collaboration diagram for CoinError:Public Member Functions | |
Get error attributes | |
| const std::string & | message () const |
| get message text | |
| const std::string & | methodName () const |
| get name of method instantiating error | |
| const std::string & | className () const |
| get name of class instantiating error (or hint for assert) | |
| const std::string & | fileName () const |
| get name of file for assert | |
| int | lineNumber () const |
| get line number of assert (-1 if not assert) | |
| void | print (bool doPrint=true) const |
| Just print (for asserts) | |
Constructors and destructors | |
| CoinError (std::string message__, std::string methodName__, std::string className__, std::string fileName_=std::string(), int line=-1) | |
| Alternate Constructor. | |
| CoinError (const CoinError &source) | |
| Copy constructor. | |
| CoinError & | operator= (const CoinError &rhs) |
| Assignment operator. | |
| virtual | ~CoinError () |
| Destructor. | |
Static Public Attributes | |
| static bool | printErrors_ |
| Whether to print every error. | |
Friends | |
| void | CoinErrorUnitTest () |
| A function that tests the methods in the CoinError class. | |
Error Class thrown by an exception.
This class is used when exceptions are thrown. It contains:
For asserts class=> optional hint
Definition at line 42 of file CoinError.hpp.
| CoinError::CoinError | ( | std::string | message__, |
| std::string | methodName__, | ||
| std::string | className__, | ||
| std::string | fileName_ = std::string(), |
||
| int | line = -1 |
||
| ) | [inline] |
Alternate Constructor.
Definition at line 99 of file CoinError.hpp.
| CoinError::CoinError | ( | const CoinError & | source | ) | [inline] |
Copy constructor.
Definition at line 116 of file CoinError.hpp.
| virtual CoinError::~CoinError | ( | ) | [inline, virtual] |
Destructor.
Definition at line 141 of file CoinError.hpp.
| const std::string& CoinError::message | ( | ) | const [inline] |
get message text
Definition at line 65 of file CoinError.hpp.
| const std::string& CoinError::methodName | ( | ) | const [inline] |
get name of method instantiating error
Definition at line 68 of file CoinError.hpp.
| const std::string& CoinError::className | ( | ) | const [inline] |
get name of class instantiating error (or hint for assert)
Definition at line 71 of file CoinError.hpp.
| const std::string& CoinError::fileName | ( | ) | const [inline] |
get name of file for assert
Definition at line 74 of file CoinError.hpp.
| int CoinError::lineNumber | ( | ) | const [inline] |
get line number of assert (-1 if not assert)
Definition at line 77 of file CoinError.hpp.
| void CoinError::print | ( | bool | doPrint = true | ) | const [inline] |
Just print (for asserts)
Definition at line 80 of file CoinError.hpp.
Assignment operator.
Definition at line 128 of file CoinError.hpp.
| void CoinErrorUnitTest | ( | ) | [friend] |
A function that tests the methods in the CoinError class.
The only reason for it not to be a member method is that this way it doesn't have to be compiled into the library. And that's a gain, because the library should be compiled with optimization on, but this method should be compiled with debugging.
bool CoinError::printErrors_ [static] |
Whether to print every error.
Definition at line 165 of file CoinError.hpp.
1.7.6.1