Commit ae058a94 authored by Ian Roddis's avatar Ian Roddis

Tests all pass, but not convinced this is the right solution.

parent 6da2da36
......@@ -288,16 +288,19 @@ namespace Async {
void resolve(const std::shared_ptr<Core>& core) override {
if (resolveCount_ >= 1)
throw Error("Resolve must not be called more than once");
return; //TODO is this the right thing?
//throw Error("Resolve must not be called more than once");
doResolve(coreCast(core));
++resolveCount_;
doResolve(coreCast(core));
}
void reject(const std::shared_ptr<Core>& core) override {
if (rejectCount_ >= 1)
throw Error("Reject must not be called more than once");
return; //TODO is this the right thing?
//throw Error("Reject must not be called more than once");
++rejectCount_;
try {
doReject(coreCast(core));
} catch (const InternalRethrow& e) {
......@@ -308,7 +311,6 @@ namespace Async {
}
}
++rejectCount_;
}
std::shared_ptr<CoreT<T>> coreCast(const std::shared_ptr<Core>& core) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment