faudes::Exception Class Reference

Detailed Description

Faudes exception class.

libFAUDES uses the C++ exception mechanism to report errors on file IO and all sorts of invalid arguments. Members are

Parameters
FunctionFunction name (where did the exception happen)
DescriptionDetailed description (human readable comment)
ErrorIdError id (numeric id, see below)

Define the compiletime option FAUDES_DEBUG_EXCEPTIONS
to enable verbose output when exceptions are thrown, including those that are catched on another level. Define the compiletime option FAUDES_CHECKED to turn on argument validation on both internal and user functions.

(File-) System Errors

  • 0: Error not defined or no error id given
  • 1: ios::failure thrown while opening/reading/seeking file
  • 2: ios::failure thrown while opening/writing file
  • 3: error on in systemcall (eg dot)

Symboltable Errors

  • 40: SymbolTable - overflow
  • 41: SymbolTable - attempt to insert or set name which already exists
  • 42: SymbolTable - attempt to insert or set index which already exists
  • 43: SymbolTable - attempt to insert or set invalid name

Runtime interface error

  • 45: Registry - attempt to insert invalid entry
  • 46: Registry - attempt to access non existent entry
  • 47: Registry - parameter index out of range
  • 48: Registry - type check error
  • 49: Registry - function execution error

Token IO Errors

Container Classes Errors

  • 60: IndexSet: index not found (eg. when accessing attribute)
  • 61: IndexSet: attempt to insert invalid index 0
  • 62: BaseSet: invalid iterator
  • 63: BaseSet: invalid attribute access
  • 65: NameSet: referring to index with no symbolic name
  • 66: NameSet: referring unknown symbolic name
  • 67: NameSet: symboltable mismatch
  • 68: TransSet: order mismatch
  • 69: BaseVector: invalid index

Core Generator Classes Errors

  • 80: Generator: reading invalid stateset
  • 85: Generator: reading invalid transition set
  • 88: Generator: symbol table mismatch
  • 89: Generator: referring to unkown event name
  • 90: Generator: referring to unkown state name
  • 91: Generator: setting transition/initial/marked property for unkown state
  • 92: Generator: initial state does not exist uniquely
  • 95: Generator: transition referring to unknown states/event
  • 96: Generator: source must not match destination
  • 99: Generator: internal validity check failed

Generator Operation Errors

  • 100: Alphabet mismatch
  • 101: Nondeterministic argument
  • 110: Break on application request
  • 1xx See respective functions
  • 2xx See respective functions

Exception ids between 300 and 999 are used by LRT plugins.

  • 55x IODevice

Definition at line 118 of file cfl_exception.h.

#include <cfl_exception.h>

Public Member Functions

 Exception (const std::string &rFunctionName, const std::string &rDescription, unsigned int errorId, bool mute=false)
 Constructor. More...
 
virtual ~Exception () throw ()
 Destructor. More...
 
virtual const char * Where () const throw ()
 Returns Function. More...
 
virtual const char * What () const throw ()
 Returns error description. More...
 
virtual const char * Message () const throw ()
 Returns error description. More...
 
virtual unsigned int Id () const throw ()
 Returns error id. More...
 

Private Attributes

std::string mFunctionName
 Function name. More...
 
std::string mDescription
 Error description. More...
 
std::string mMessage
 Error message. More...
 
unsigned int mErrorId
 Error id. More...
 

Constructor & Destructor Documentation

◆ Exception()

faudes::Exception::Exception ( const std::string &  rFunctionName,
const std::string &  rDescription,
unsigned int  errorId,
bool  mute = false 
)
explicit

Constructor.

Writes an error message on stderr and throws an exception.

Parameters
rFunctionNameFunction name (where did the exception happen)
rDescriptionDetailed error description
errorIdError id
mutewhen true, mute console output (this is meant for threaded applications where console out may be an issue)

Definition at line 27 of file cfl_exception.cpp.

◆ ~Exception()

faudes::Exception::~Exception ( )
throw (
)
virtual

Destructor.

Definition at line 39 of file cfl_exception.cpp.

Member Function Documentation

◆ Id()

unsigned int faudes::Exception::Id ( ) const
throw (
)
virtual

Returns error id.

Definition at line 49 of file cfl_exception.cpp.

◆ Message()

const char * faudes::Exception::Message ( ) const
throw (
)
virtual

Returns error description.

Definition at line 53 of file cfl_exception.cpp.

◆ What()

const char * faudes::Exception::What ( ) const
throw (
)
virtual

Returns error description.

Definition at line 45 of file cfl_exception.cpp.

◆ Where()

const char * faudes::Exception::Where ( ) const
throw (
)
virtual

Returns Function.

Definition at line 41 of file cfl_exception.cpp.

Member Data Documentation

◆ mDescription

std::string faudes::Exception::mDescription
private

Error description.

Definition at line 158 of file cfl_exception.h.

◆ mErrorId

unsigned int faudes::Exception::mErrorId
private

Error id.

Definition at line 164 of file cfl_exception.h.

◆ mFunctionName

std::string faudes::Exception::mFunctionName
private

Function name.

Definition at line 155 of file cfl_exception.h.

◆ mMessage

std::string faudes::Exception::mMessage
private

Error message.

Definition at line 161 of file cfl_exception.h.


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

libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen