Sauce-0.10.1: sauce::internal::PendingThrower Class Reference

Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
sauce::internal::PendingThrower Class Reference

A mixin to defer and throw pending exceptions. More...

`#include <sauce/internal/pending_thrower.h>`

Inheritance diagram for sauce::internal::PendingThrower:
[legend]

## Public Member Functions
template<typename Exception >
void | throwLater ()
| Save an exception of the given type to throw when it is safe.
void | throwAnyPending ()
| Throw and clear any saved exception.
PendingThrow | clear ()
| Clear and return any saved exception.

## Detailed Description

A mixin to defer and throw pending exceptions.

## Member Function Documentation

PendingThrow sauce::internal::PendingThrower::clear | ( |  | ) |
| inline

Clear and return any saved exception.

returns NULL if no exception is pending.

{
PendingThrow toThrow = pending;
pending = NULL;
return toThrow;
}
template<typename Exception >

void sauce::internal::PendingThrower::throwLater | ( |  | ) |
| inline

Save an exception of the given type to throw when it is safe.

The exception must have an accessible nullary constructor.

Any previously saved exception is dropped.

{
pending = &pendingThrowFactory<Exception>;
}

The documentation for this class was generated from the following file:

- sauce/internal/pending_thrower.h