Rename and clean the README
This commit is contained in:
parent
58afecfa27
commit
0343b98552
2 changed files with 35 additions and 30 deletions
30
README
30
README
|
|
@ -1,30 +0,0 @@
|
||||||
|
|
||||||
A C++ exception class and macros with easy nested declaration and localisation
|
|
||||||
data.
|
|
||||||
|
|
||||||
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
|
|
||||||
with the given description returned by the _what_ standard method.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
`throw Existential_Observation( "Shit happens", E_INFOS );`
|
|
||||||
|
|
||||||
Additionaly, it permits a one-line declaration of new exceptions, derived from
|
|
||||||
existing ones.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
`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" );`
|
|
||||||
|
|
||||||
35
README.md
Normal file
35
README.md
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
|
||||||
|
A C++ exception class and macros with easy nested declaration and localisation
|
||||||
|
data.
|
||||||
|
|
||||||
|
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 with the given description returned by the `what` standard method.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```cpp
|
||||||
|
throw Existential_Observation( "Shit happens", E_INFOS );
|
||||||
|
```
|
||||||
|
|
||||||
|
Additionaly, it permits a one-line declaration of new exceptions, derived from
|
||||||
|
existing ones.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```cpp
|
||||||
|
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:
|
||||||
|
```cpp
|
||||||
|
RAISE( Pastafarism_Observation, "Shit happens with " << 42 << " noodly appendages" );
|
||||||
|
```
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue