Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

excepcion.hpp File Reference

#include "jic/log/trazas.hpp"
#include <string>
#include <strstream>
#include <stdexcept>

Include dependency graph for excepcion.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define EXCEPCION(NombreExcepcion)
#define EXCEPCION_DE(ExcBase, NombreExcepcion)
#define THROW(Excepcion, Descripcion)


Define Documentation

#define EXCEPCION NombreExcepcion   
 

Value:

class NombreExcepcion : public std::runtime_error \
{ \
  public: \
     NombreExcepcion(const std::string & descripcion = "") \
       : std::runtime_error(std::string(# NombreExcepcion) + ( descripcion.empty() ? "" : " : ") + descripcion) \
     {} \
}

#define EXCEPCION_DE ExcBase,
NombreExcepcion   
 

Value:

class NombreExcepcion : public ExcBase \
{ \
  public: \
     NombreExcepcion(const std::string & descripcion = "") \
       : ExcBase(std::string(#NombreExcepcion) + ( descripcion.empty() ? "" : " : ") + descripcion) \
     {} \
}

#define THROW Excepcion,
Descripcion   
 

Value:

{ \
  std::strstream * info = new std::strstream; \
  (*info) << Descripcion << " ( " << __FILE__ << ", " << __LINE__ << " )" << std::ends; \
  char *cadena = info->str(); \
  Excepcion exc(cadena); \
  delete cadena; \
  delete info; \
  SUCESO(exc.what()); \
  throw(exc); \
  }


Generated on Wed Mar 5 21:33:23 2003 for JIC by doxygen1.3-rc3