Library of Assembled Shared Sources
lass::util::Exception Class Reference

type of all exceptions in lass More...

#include <exception.h>

Related Symbols

(Note that these are not member symbols.)

#define LASS_THROW_EX(t_exception, s_message)
 To throw an exception like util::Exception that accepts a message and a location string, you can supply those strings yourself, ore you can use this macro for your convenience.
 

Detailed Description

type of all exceptions in lass

Author
Bram de Greve [Bramz]
See also
LASS_THROW

Definition at line 82 of file util/exception.h.

Friends And Related Symbol Documentation

◆ LASS_THROW_EX

#define LASS_THROW_EX ( t_exception,
s_message )
related
Value:
do\
{\
::std::ostringstream lassUtilExceptionImplBuffer;\
lassUtilExceptionImplBuffer << s_message;\
throw t_exception(lassUtilExceptionImplBuffer.str(), LASS_PRETTY_FUNCTION);\
}\
while (false)

To throw an exception like util::Exception that accepts a message and a location string, you can supply those strings yourself, ore you can use this macro for your convenience.

This macro will fill in the location by itself so that you only have to worry about the message.
And as an extra, the message is streamed, so you can use the regular operator<< to concatenate variables in the message.

int foo = -5;
if (foo < 0)
{
LASS_THROW_EX(util::Exception, "foo '" << foo << "' is less than zero");
}
type of all exceptions in lass

Definition at line 202 of file basic_ops.h.


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