summaryrefslogtreecommitdiffabout
path: root/include
Unidiff
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-rw-r--r--include/konforka/exception.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/konforka/exception.h b/include/konforka/exception.h
index 5e0bf96..dbfe27c 100644
--- a/include/konforka/exception.h
+++ b/include/konforka/exception.h
@@ -26,6 +26,37 @@
26#define NOCODEPOINT "no information" 26#define NOCODEPOINT "no information"
27 27
28/** 28/**
29 * @def KONFORKA_RETHROW
30 * the convenience definition for seeing the exception and rethrowing it further.
31 */
32#define KONFORKA_RETHROW catch(konforka::exception& e) { e.see(CODEPOINT); throw; }
33
34/**
35 * @def KONFORKA_E_ARGS
36 * the convenience definition for naming codepoint parameters
37 */
38#define KONFORKA_E_PARS const string& fi,const string& fu,int l,const string& w
39
40/**
41 * @def KONFORKA_E_CONS
42 * the convenience definition for passing parameters to constructor
43 */
44#define KONFORKA_E_CONS fi,fu,l,w
45
46/**
47 * @def KONFORKA_E_SUBCLASS
48 * the convenience definition for subclassing konforka exceptions
49 * @param base base class
50 * @param derived derived class
51 */
52#define KONFORKA_E_SUBCLASS(derived,base) \
53 class derived : public base { \
54 public: \
55 explicit derived(KONFORKA_E_PARS) \
56 : base(KONFORKA_E_CONS) { } \
57 }
58
59/**
29 * @brief The main konforka namespace. 60 * @brief The main konforka namespace.
30 */ 61 */
31namespace konforka { 62namespace konforka {