Classes | Namespaces | Macros | Functions
BalauException.hpp File Reference

(10)

Base Balau exception classes. More...

#include <Balau/Type/ToString.hpp>
#include <Balau/Util/Macros.hpp>
Include dependency graph for BalauException.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BalauException
 Base class of all Balau exceptions. More...
 
class  BugException
 Thrown when a bug is encountered (mainly unimplemented switch cases). More...
 
class  ConversionException
 Thrown when a conversion fails. More...
 
class  IllegalArgumentException
 Thrown when an illegal argument is passed to a function or method. More...
 
class  IllegalStateException
 Thrown when a variable is not in a valid state or when a section of code has been executed at an inappropriate time. More...
 
class  NotImplementedException
 Thrown when a feature is not yet implemented. More...
 
class  UnsupportedOperationException
 Thrown when an operation is deliberately not implemented. More...
 

Namespaces

 Balau::Exception
 All exception classes.
 

Macros

#define ThrowBalauException(ExceptionClass, ...)
 Throw a Balau style exception, with implicit file and line number, and optional stacktrace. More...
 

Functions

bool operator== (const BalauException &lhs, const BalauException &rhs)
 Base class comparison function for Balau exceptions. More...
 
template<typename AllocatorT >
Balau::U8String< AllocatorT > toString (const BalauException &e)
 Base class toString<AllocatorT> function for Balau exceptions. More...
 
std::string toString (const std::exception &e)
 Catch all to-string function for std::exception. More...
 

Detailed Description

Base Balau exception classes.

Macro Definition Documentation

◆ ThrowBalauException

#define ThrowBalauException (   ExceptionClass,
  ... 
)
Value:
{ \
_ThrowBalauException_generateStackTrace \
throw ExceptionClass(__FILE__, __LINE__, st, __VA_ARGS__); \
void _Balau_SwallowSemiColon_()
Empty inline function that is used to force a semicolon at the end of a macro and to prevent empty st...
Definition: StdTypes.hpp:179

Throw a Balau style exception, with implicit file and line number, and optional stacktrace.

If you do not wish to see the ThrowBalau prefix on each of your throw statements in your code, define an alias macro for this macro.

Function Documentation

◆ toString()

Balau::U8String< AllocatorT > toString ( const std::exception &  e)
inline

Catch all to-string function for std::exception.