The whole thing

This commit is contained in:
Johann Dreo 2014-03-14 21:06:56 +01:00
commit 58afecfa27
3 changed files with 116 additions and 3 deletions

13
README
View file

@ -6,7 +6,7 @@ The point of this system is to permits to easily add to exceptions instances
some informations about _where_ the exceptions are thrown.
To do so, it uses compilers macros that indicates the current function, file and
line (__FUNCTION__, __FILE__ and __LINE__ for g++) and merge those information
line (`__FUNCTION__`, `__FILE__` and `__LINE__` for g++) and merge those information
with the given description returned by the _what_ standard method.
Example:
@ -16,8 +16,15 @@ Additionaly, it permits a one-line declaration of new exceptions, derived from
existing ones.
Example:
`EXCEPTION(Exception, Existential_Observation );
EXCEPTION(Existential_Observation, Pastafarism_Observation );`
`EXCEPTION( Exception, Existential_Observation );
EXCEPTION( Existential_Observation, Pastafarism_Observation );`
Note that the base "Exception" class derivate from std::exception.
It also provides a macro to easily throw an exception
that permits to use dynamic streamed messages inline and
without having to specify E_INFOS.
Example:
`RAISE( Pastafarism_Observation, "Shit happens with " << 42 << " noodly appendages" );`