Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | Friends | List of all members
dynamicgraph::ExceptionAbstract Class Reference

Abstract root class for all dynamic-graph exceptions. More...

#include <exception-abstract.h>

Inheritance diagram for dynamicgraph::ExceptionAbstract:
Inheritance graph
[legend]

Classes

class  Param
 Class owned by exceptions to store error locations. More...
 

Public Types

enum  ExceptionEnum {
  ABSTRACT = 0, SIGNAL = 100, FACTORY = 200, TRACES = 300,
  TOOLS = 700
}
 Categories error code. More...
 

Public Member Functions

 ExceptionAbstract (const int &code, const std::string &msg="")
 
int getCode () const
 Access to the error code. More...
 
virtual const std::string & getExceptionName () const
 
const char * getMessage () const
 Access to the pointer on the array of char related to the error string. More...
 
const std::string & getStringMessage () const
 Reference access to the error message (can be empty). More...
 
virtual const char * what () const throw ()
 
virtual ~ExceptionAbstract () throw ()
 

Static Public Attributes

static const std::string EXCEPTION_NAME = "Abstract"
 

Protected Attributes

int code
 Error code. More...
 
std::string message
 Error message (can be empty). More...
 

Private Member Functions

 ExceptionAbstract ()
 Forbid the empty constructor (private). More...
 

Friends

DYNAMIC_GRAPH_DLLAPI friend std::ostream & operator<< (std::ostream &os, const ExceptionAbstract &err)
 Print the error structure. More...
 

Detailed Description

Abstract root class for all dynamic-graph exceptions.

Definition at line 31 of file exception-abstract.h.

Member Enumeration Documentation

◆ ExceptionEnum

Categories error code.

Each value matches categories used by a subclass of ExceptionAbstract.

This is the programmer responsibility to make sure there is enough room between two categories error code.

Enumerator
ABSTRACT 
SIGNAL 
FACTORY 
TRACES 
TOOLS 

Definition at line 67 of file exception-abstract.h.

Constructor & Destructor Documentation

◆ ExceptionAbstract() [1/2]

dynamicgraph::ExceptionAbstract::ExceptionAbstract ( const int &  code,
const std::string &  msg = "" 
)
explicit

Definition at line 13 of file exception-abstract.cpp.

◆ ~ExceptionAbstract()

virtual dynamicgraph::ExceptionAbstract::~ExceptionAbstract ( )
throw (
)
inlinevirtual

Definition at line 78 of file exception-abstract.h.

◆ ExceptionAbstract() [2/2]

dynamicgraph::ExceptionAbstract::ExceptionAbstract ( )
private

Forbid the empty constructor (private).

Member Function Documentation

◆ getCode()

int dynamicgraph::ExceptionAbstract::getCode ( ) const

Access to the error code.

Definition at line 24 of file exception-abstract.cpp.

◆ getExceptionName()

virtual const std::string& dynamicgraph::ExceptionAbstract::getExceptionName ( ) const
inlinevirtual

◆ getMessage()

const char * dynamicgraph::ExceptionAbstract::getMessage ( ) const

Access to the pointer on the array of char related to the error string.

Cannot be NULL.

Definition at line 16 of file exception-abstract.cpp.

◆ getStringMessage()

const std::string & dynamicgraph::ExceptionAbstract::getStringMessage ( ) const

Reference access to the error message (can be empty).

Definition at line 20 of file exception-abstract.cpp.

◆ what()

virtual const char* dynamicgraph::ExceptionAbstract::what ( ) const
throw (
)
inlinevirtual

Definition at line 94 of file exception-abstract.h.

Friends And Related Function Documentation

◆ operator<<

DYNAMIC_GRAPH_DLLAPI friend std::ostream& operator<< ( std::ostream &  os,
const ExceptionAbstract err 
)
friend

Print the error structure.

Definition at line 48 of file exception-abstract.cpp.

Member Data Documentation

◆ code

int dynamicgraph::ExceptionAbstract::code
protected

Error code.

See also
ErrorCodeEnum

Definition at line 105 of file exception-abstract.h.

◆ EXCEPTION_NAME

const std::string dynamicgraph::ExceptionAbstract::EXCEPTION_NAME = "Abstract"
static

Definition at line 75 of file exception-abstract.h.

◆ message

std::string dynamicgraph::ExceptionAbstract::message
protected

Error message (can be empty).

Definition at line 108 of file exception-abstract.h.


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


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03