Changes in libcfa/src/exception.h [1c01c58:046a890]
- File:
-
- 1 edited
-
libcfa/src/exception.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/exception.h
r1c01c58 r046a890 76 76 // implemented in the .c file either so they all have to be inline. 77 77 78 trait is_exception(dtype exceptT) {78 trait is_exception(dtype T) { 79 79 /* The first field must be a pointer to a virtual table. 80 80 * That virtual table must be a decendent of the base exception virtual tab$ 81 81 */ 82 void mark_exception( exceptT *);82 void mark_exception(T *); 83 83 // This is never used and should be a no-op. 84 84 }; 85 85 86 trait is_termination_exception(dtype exceptT | is_exception(exceptT)) {87 void defaultTerminationHandler( exceptT &);86 trait is_termination_exception(dtype T | is_exception(T)) { 87 void defaultTerminationHandler(T &); 88 88 }; 89 89 90 trait is_resumption_exception(dtype exceptT | is_exception(exceptT)) {91 void defaultResumptionHandler( exceptT &);90 trait is_resumption_exception(dtype T | is_exception(T)) { 91 void defaultResumptionHandler(T &); 92 92 }; 93 93 94 forall(dtype exceptT | is_termination_exception(exceptT))95 static inline void $throw( exceptT & except) {94 forall(dtype T | is_termination_exception(T)) 95 static inline void $throw(T & except) { 96 96 __cfaehm_throw_terminate( 97 97 (exception_t *)&except, … … 100 100 } 101 101 102 forall(dtype exceptT | is_resumption_exception(exceptT))103 static inline void $throwResume( exceptT & except) {102 forall(dtype T | is_resumption_exception(T)) 103 static inline void $throwResume(T & except) { 104 104 __cfaehm_throw_resume( 105 105 (exception_t *)&except, … … 108 108 } 109 109 110 forall(dtype exceptT | is_exception(exceptT))111 static inline void cancel_stack( exceptT & except) __attribute__((noreturn)) {110 forall(dtype T | is_exception(T)) 111 static inline void cancel_stack(T & except) __attribute__((noreturn)) { 112 112 __cfaehm_cancel_stack( (exception_t *)&except ); 113 113 } 114 114 115 forall(dtype exceptT | is_exception(exceptT))116 static inline void defaultTerminationHandler( exceptT & except) {115 forall(dtype T | is_exception(T)) 116 static inline void defaultTerminationHandler(T & except) { 117 117 return cancel_stack( except ); 118 118 } 119 119 120 forall(dtype exceptT | is_exception(exceptT))121 static inline void defaultResumptionHandler( exceptT & except) {120 forall(dtype T | is_exception(T)) 121 static inline void defaultResumptionHandler(T & except) { 122 122 throw except; 123 123 }
Note:
See TracChangeset
for help on using the changeset viewer.