#include <stlib/Object.h>
Include dependency graph for GenericException.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | Core |
Defines | |
#define | MAXSTACKSIZE 64 |
#define | _ensure(guardedBlock, ensureBlock) |
This is stand-alone implementation of finally construct as seen in Java. |
|
Value: GenericException *_catched_exception = nil; \ try { guardedBlock ; } \ catch (GenericException *ex) { _catched_exception = ex; } \ ensureBlock ; \ if (_catched_exception != nil) _catched_exception->pass() finally construct as seen in Java.
If you need to do something whenever exception raised or not, you may want to use this macro. The only drawback is syntax. Stream *stream = whatever; // Open stream that needs explicit close. _ensure ( // Part that operates the stream do_something(stream) , // Part that must be evaluated whenever an execetion is raised or not stream->close() ); Definition at line 119 of file GenericException.h. Referenced by Tools::Filename::contentOfEntireFile(), Core::ByteCharacterEncoder::loadFrom(), Tools::Filename::privateCopy(), and Tools::ConfigurationReader::readConfiguration(). |
|
Definition at line 29 of file GenericException.h. Referenced by Core::GenericException::getExecutionStack(). |