1 #ifndef SAUCE_INTERNAL_PENDING_THROWER_H_
2 #define SAUCE_INTERNAL_PENDING_THROWER_H_
7 typedef void (*PendingThrow)();
15 template<
typename Exception>
16 void pendingThrowFactory() {
38 template<
typename Exception>
40 pending = &pendingThrowFactory<Exception>;
47 PendingThrow toThrow =
clear();
59 PendingThrow toThrow = pending;
67 namespace i = ::sauce::internal;
71 #endif // SAUCE_INTERNAL_PENDING_THROWER_H_
void throwLater()
Save an exception of the given type to throw when it is safe.
Definition: pending_thrower.h:39
PendingThrow clear()
Clear and return any saved exception.
Definition: pending_thrower.h:58
void throwAnyPending()
Throw and clear any saved exception.
Definition: pending_thrower.h:46
A mixin to defer and throw pending exceptions.
Definition: pending_thrower.h:23