CoinUtils  2.11.9
Private Member Functions | Friends | List of all members
CoinError Class Reference

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 More...
 
const std::string & methodName () const
 get name of method instantiating error More...
 
const std::string & className () const
 get name of class instantiating error (or hint for assert) More...
 
const std::string & fileName () const
 get name of file for assert More...
 
int lineNumber () const
 get line number of assert (-1 if not assert) More...
 
void print (bool doPrint=true) const
 Just print (for asserts) More...
 
const std::string & message () const
 get message text More...
 
const std::string & methodName () const
 get name of method instantiating error More...
 
const std::string & className () const
 get name of class instantiating error (or hint for assert) More...
 
const std::string & fileName () const
 get name of file for assert More...
 
int lineNumber () const
 get line number of assert (-1 if not assert) More...
 
void print (bool doPrint=true) const
 Just print (for asserts) More...
 
Constructors and destructors
 CoinError (std::string message__, std::string methodName__, std::string className__, std::string fileName_=std::string(), int line=-1)
 Alternate Constructor. More...
 
 CoinError (const CoinError &source)
 Copy constructor. More...
 
CoinErroroperator= (const CoinError &rhs)
 Assignment operator. More...
 
virtual ~CoinError ()
 Destructor. More...
 
 CoinError (std::string message__, std::string methodName__, std::string className__, std::string fileName_=std::string(), int line=-1)
 Alternate Constructor. More...
 
 CoinError (const CoinError &source)
 Copy constructor. More...
 
CoinErroroperator= (const CoinError &rhs)
 Assignment operator. More...
 
virtual ~CoinError ()
 Destructor. More...
 

Private Member Functions

 CoinError ()
 
 CoinError ()
 

Friends

void CoinErrorUnitTest ()
 A function that tests the methods in the CoinError class. More...
 
void CoinErrorUnitTest ()
 A function that tests the methods in the CoinError class. More...
 

Private member data

std::string message_
 message test More...
 
std::string method_
 method name More...
 
std::string class_
 class name or hint More...
 
std::string file_
 file name More...
 
int lineNumber_
 Line number. More...
 
static bool printErrors_
 Whether to print every error. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CoinError() [1/6]

CoinError::CoinError ( )
inlineprivate

Definition at line 46 of file CoinError.hpp.

◆ CoinError() [2/6]

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 106 of file CoinError.hpp.

◆ CoinError() [3/6]

CoinError::CoinError ( const CoinError source)
inline

Copy constructor.

Definition at line 122 of file CoinError.hpp.

◆ ~CoinError() [1/2]

virtual CoinError::~CoinError ( )
inlinevirtual

Destructor.

Definition at line 146 of file CoinError.hpp.

◆ CoinError() [4/6]

CoinError::CoinError ( )
inlineprivate

Definition at line 46 of file CoinError.hpp.

◆ CoinError() [5/6]

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 106 of file CoinError.hpp.

◆ CoinError() [6/6]

CoinError::CoinError ( const CoinError source)
inline

Copy constructor.

Definition at line 122 of file CoinError.hpp.

◆ ~CoinError() [2/2]

virtual CoinError::~CoinError ( )
inlinevirtual

Destructor.

Definition at line 146 of file CoinError.hpp.

Member Function Documentation

◆ message() [1/2]

const std::string& CoinError::message ( ) const
inline

get message text

Definition at line 63 of file CoinError.hpp.

◆ methodName() [1/2]

const std::string& CoinError::methodName ( ) const
inline

get name of method instantiating error

Definition at line 68 of file CoinError.hpp.

◆ className() [1/2]

const std::string& CoinError::className ( ) const
inline

get name of class instantiating error (or hint for assert)

Definition at line 73 of file CoinError.hpp.

◆ fileName() [1/2]

const std::string& CoinError::fileName ( ) const
inline

get name of file for assert

Definition at line 78 of file CoinError.hpp.

◆ lineNumber() [1/2]

int CoinError::lineNumber ( ) const
inline

get line number of assert (-1 if not assert)

Definition at line 83 of file CoinError.hpp.

◆ print() [1/2]

void CoinError::print ( bool  doPrint = true) const
inline

Just print (for asserts)

Definition at line 88 of file CoinError.hpp.

◆ operator=() [1/2]

CoinError& CoinError::operator= ( const CoinError rhs)
inline

Assignment operator.

Definition at line 133 of file CoinError.hpp.

◆ message() [2/2]

const std::string& CoinError::message ( ) const
inline

get message text

Definition at line 63 of file CoinError.hpp.

◆ methodName() [2/2]

const std::string& CoinError::methodName ( ) const
inline

get name of method instantiating error

Definition at line 68 of file CoinError.hpp.

◆ className() [2/2]

const std::string& CoinError::className ( ) const
inline

get name of class instantiating error (or hint for assert)

Definition at line 73 of file CoinError.hpp.

◆ fileName() [2/2]

const std::string& CoinError::fileName ( ) const
inline

get name of file for assert

Definition at line 78 of file CoinError.hpp.

◆ lineNumber() [2/2]

int CoinError::lineNumber ( ) const
inline

get line number of assert (-1 if not assert)

Definition at line 83 of file CoinError.hpp.

◆ print() [2/2]

void CoinError::print ( bool  doPrint = true) const
inline

Just print (for asserts)

Definition at line 88 of file CoinError.hpp.

◆ operator=() [2/2]

CoinError& CoinError::operator= ( const CoinError rhs)
inline

Assignment operator.

Definition at line 133 of file CoinError.hpp.

Friends And Related Function Documentation

◆ CoinErrorUnitTest [1/2]

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.

◆ CoinErrorUnitTest [2/2]

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.

Member Data Documentation

◆ message_

std::string CoinError::message_
private

message test

Definition at line 156 of file CoinError.hpp.

◆ method_

std::string CoinError::method_
private

method name

Definition at line 158 of file CoinError.hpp.

◆ class_

std::string CoinError::class_
private

class name or hint

Definition at line 160 of file CoinError.hpp.

◆ file_

std::string CoinError::file_
private

file name

Definition at line 162 of file CoinError.hpp.

◆ lineNumber_

int CoinError::lineNumber_
private

Line number.

Definition at line 164 of file CoinError.hpp.

◆ printErrors_

static bool CoinError::printErrors_
static

Whether to print every error.

Definition at line 169 of file CoinError.hpp.


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