ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | List of all members
anna::RuntimeException Class Reference

#include <RuntimeException.hpp>

Inheritance diagram for anna::RuntimeException:
Inheritance graph
[legend]
Collaboration diagram for anna::RuntimeException:
Collaboration graph
[legend]

Public Member Functions

 RuntimeException (const char *text, const char *fromFile, const int fromLine)
 
 RuntimeException (const std::string &text, const char *fromFile, const int fromLine)
 
 RuntimeException (const std::string &fileName, const int xerrno, const char *fromFile, const int fromLine)
 
 RuntimeException (const RuntimeException &other)
 
 RuntimeException (const Exception &other)
 
int getErrorNumber () const
 
- Public Member Functions inherited from anna::Exception
 Exception (const char *text, const char *fromFile, const int fromLine)
 
 Exception (const Exception &other)
 
virtual ~Exception ()
 
const std::string & getText () const
 
const char * getFromFile () const
 
int getFromLine () const
 
void setErrorCode (const int errorCode)
 
int getErrorCode () const
 
Exceptionoperator= (const Exception &right)
 
std::string asString () const
 
const char * what () const noexcept
 
void trace () const
 

Additional Inherited Members

- Protected Member Functions inherited from anna::Exception
 Exception (const char *text, const char *name, const char *fromFile, const int fromLine)
 
void setText (const char *text)
 
void setText (const std::string &text)
 

Detailed Description

Excepcion lanzada durante la ejecucion de un caso de prueba al comprobar que alguna situacion es anomala.

Constructor & Destructor Documentation

◆ RuntimeException() [1/5]

anna::RuntimeException::RuntimeException ( const char *  text,
const char *  fromFile,
const int  fromLine 
)
inline

Constructor.

Parameters
textTexto con la explicacion de la excepcion.
fromFileFichero en el que se provoco la situacion de error.
fromLineLinea del fichero en la que se provoco la situacion de error.
32  :
33  Exception(text, "RuntimeException", fromFile, fromLine),
34  a_errno(-1) {}
Exception(const char *text, const char *fromFile, const int fromLine)

◆ RuntimeException() [2/5]

anna::RuntimeException::RuntimeException ( const std::string &  text,
const char *  fromFile,
const int  fromLine 
)
inlineexplicit

Constructor.

Parameters
textTexto con la explicacion de la excepcion.
fromFileFichero en el que se provoco la situacion de error.
fromLineLinea del fichero en la que se provoco la situacion de error.
43  :
44  Exception(text.c_str(), "RuntimeException", fromFile, fromLine),
45  a_errno(-1) {}
Exception(const char *text, const char *fromFile, const int fromLine)

◆ RuntimeException() [3/5]

anna::RuntimeException::RuntimeException ( const std::string &  fileName,
const int  xerrno,
const char *  fromFile,
const int  fromLine 
)
inlineexplicit

Constructor.

Parameters
fileNameNombre del fichero sobre el que actuabamos
xerrnoNumero de error (errno) generado por la ultima operacion de IO o SO.
fromFileFichero en el que se provoco la situacion de error.
fromLineLinea del fichero en la que se provoco la situacion de error.
55  :
56  Exception(std::string(fileName + ": " + strerror(xerrno)).c_str(), "RuntimeException", fromFile, fromLine),
57  a_errno(xerrno) {}
Exception(const char *text, const char *fromFile, const int fromLine)

◆ RuntimeException() [4/5]

anna::RuntimeException::RuntimeException ( const RuntimeException other)
inline

Constructor Copia.

Parameters
otherInstancia de la que obtener la informacion.
63  : Exception(other),
64  a_errno(other.a_errno)
65  {;}
Exception(const char *text, const char *fromFile, const int fromLine)

◆ RuntimeException() [5/5]

anna::RuntimeException::RuntimeException ( const Exception other)
inline

Constructor Copia.

Parameters
otherInstancia de la que obtener la informacion.
71  : Exception(other),
72  a_errno(-1)
73  {;}
Exception(const char *text, const char *fromFile, const int fromLine)

Member Function Documentation

◆ getErrorNumber()

int anna::RuntimeException::getErrorNumber ( ) const
inline
Returns
El numero de error con el que se inicio la excepcion.
78 { return a_errno; }

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