limal
Classes | Namespaces
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.

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...
 

Namespaces

namespace  limal
 

Detailed Description

Common LiMaL exceptions.

This header file declares several common exception types.

BloCxx provides several macros helping to throw exceptions:

#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);
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.