Exception.hpp File Reference

Common LiMaL exceptions. More...

#include "blocxx/BLOCXX_config.h"
#include "blocxx/Exception.hpp"
#include "limal/config.h"

Go to the source code of this file.

Namespaces

namespace  limal

Classes

class  limal::MemoryException
 MemoryException class declaration. More...
class  limal::RuntimeException
 RuntimeException class declaration. More...
class  limal::OverflowException
 OverflowException class declaration. More...
class  limal::SyntaxException
 SyntaxException class declaration. More...
class  limal::ValueException
 ValueException class declaration. More...
class  limal::SystemException
 SystemException class declaration. More...


Detailed Description

Common LiMaL exceptions.

This header file declares several common exception types.

BloCxx provides several macros helping to throw exceptions:

   #include <limal/Exception.hpp>
   #include <blocxx/Format.hpp>

   BLOCXX_THROW_ERRNO_MSG(limal::SystemException,
                          "Can't do this and that");

   const int MY_INVALID_EMAIL_ERROR_NUMBER = 42;
   BLOCXX_THROW_ERR(limal::ValueException,
                    "Argument is not a valid email",
                    MY_INVALID_EMAIL_ERROR_NUMBER);

   BLOCXX_THROW(limal::SyntaxException,
                Format("Syntax error in line %1", 42).c_str());

   try
   {
       do_something();
   }
   catch(const blocxx::Exception &subex)
   {
       BLOCXX_THROW_SUBEX(limal::RuntimeException,
                          "Bad things happened", subex);
   }
See BloCxx documentation for more informations.

Generated on Sat Jun 7 10:55:29 2008 for limal by  doxygen 1.5.5