CARMA C++
carma::antenna::bima::SharedMemoryException Class Reference

Exception class for errors The exception comes with a text string that can be printed or logged. More...

#include <carma/antenna/bima/SharedMemoryException.h>

Inheritance diagram for carma::antenna::bima::SharedMemoryException:
carma::util::BaseException

Public Member Functions

std::string getErrorMessage () const
 Get the full error message, including line number and file name. More...
 
const char * getName ()
 
void report () const
 Report error to standard err. More...
 
void setName (const char *name)
 
 SharedMemoryException (const std::string &msg, const char *filename, int lineNo)
 Constructor. More...
 
 SharedMemoryException (const std::ostringstream &msg, const char *filename, int lineNo)
 Constructor. More...
 
 SharedMemoryException (const char *name)
 Constructor. More...
 
 SharedMemoryException (const SharedMemoryException &shmException)
 Copy constructor Very important for an exception, as it is actually a copy of the exception that is transported up to the catch();. More...
 
virtual const char * what () const throw ()
 Get the error message; overrides BaseException & std::exception.what() More...
 
virtual ~SharedMemoryException () throw ()
 Destructor. More...
 
- Public Member Functions inherited from carma::util::BaseException
Backtrace getBacktrace () const
 
virtual int getLineNumber () const
 
virtual ::std::string getLogString () const
 
virtual const char * getMessage () const
 
virtual const char * getSourceFile () const
 
void logException (log4cpp::Priority::PriorityLevel priority) const
 
virtual void setMessageDirectly (const char *mesg)
 
virtual void setMessageToCopy (const char *mesg)
 
virtual void setMessageToCopy (const ::std::string &mesg)
 
virtual void setMessageToCopy (const ::std::ostringstream &oss)
 
virtual ~BaseException () throw ( )
 

Public Attributes

std::string * _name
 

Protected Member Functions

 SharedMemoryException ()
 Default constructor. More...
 
- Protected Member Functions inherited from carma::util::BaseException
 BaseException (const BaseException &rhs)
 
 BaseException (const char *mesg, const char *fileName, const int lineNo)
 Constructor - creates an instance of class BaseException. More...
 
 BaseException (const char *mesg, const ::std::string &fileName, const int lineNo)
 
 BaseException (const ::std::string &mesg, const char *fileName, const int lineNo)
 
 BaseException (const ::std::string &mesg, const ::std::string &fileName, const int lineNo)
 
 BaseException (const ::std::ostringstream &oss, const char *fileName, const int lineNo)
 
 BaseException (const ::std::ostringstream &oss, const ::std::string &fileName, const int lineNo)
 
BaseExceptionoperator= (const BaseException &rhs)
 
virtual void setLineNumber (int num)
 
void setSourceFileDirectly (const char *file)
 
void setSourceFileToCopy (const char *file)
 
void setSourceFileToCopy (const ::std::string &file)
 

Additional Inherited Members

Detailed Description

Exception class for errors The exception comes with a text string that can be printed or logged.

Definition at line 60 of file SharedMemoryException.h.

Constructor & Destructor Documentation

carma::antenna::bima::SharedMemoryException::SharedMemoryException ( const std::string &  msg,
const char *  filename,
int  lineNo 
)

Constructor.

Parameters
msgThe message for this exception.
filenameThe source file containing the code throwing the exception.
lineNoThe line number in the source file where the exception is created.
carma::antenna::bima::SharedMemoryException::SharedMemoryException ( const std::ostringstream &  msg,
const char *  filename,
int  lineNo 
)

Constructor.

Parameters
msgThe message for this exception. Make sure that the stream has been terminated with "<< ends";
filenameThe source file containing the code throwing the exception. Can be set using the cpp macro 'FILE'.
lineNoThe line number in the source file where the exception is created. Can be set using the cpp macro 'LINE'.
carma::antenna::bima::SharedMemoryException::SharedMemoryException ( const char *  name)

Constructor.

Parameters
nameThe shared memory value name..
carma::antenna::bima::SharedMemoryException::SharedMemoryException ( const SharedMemoryException shmException)

Copy constructor Very important for an exception, as it is actually a copy of the exception that is transported up to the catch();.

virtual carma::antenna::bima::SharedMemoryException::~SharedMemoryException ( )
throw (
)
virtual

Destructor.

carma::antenna::bima::SharedMemoryException::SharedMemoryException ( )
protected

Default constructor.

Member Function Documentation

std::string carma::antenna::bima::SharedMemoryException::getErrorMessage ( ) const

Get the full error message, including line number and file name.

Returns
full error message
void carma::antenna::bima::SharedMemoryException::report ( ) const

Report error to standard err.

Reports error to standard error by printing the error message, filename and line number.

virtual const char* carma::antenna::bima::SharedMemoryException::what ( ) const
throw (
)
virtual

Get the error message; overrides BaseException & std::exception.what()

Reimplemented from carma::util::BaseException.


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