mirror of
https://github.com/Naios/continuable.git
synced 2026-02-09 11:16:40 +08:00
Fix some issues with the no exception build
This commit is contained in:
parent
1042ddc1f1
commit
1e1f5cdf5b
@ -100,6 +100,8 @@ public:
|
|||||||
!defined(CONTINUABLE_WITH_NO_EXCEPTIONS)
|
!defined(CONTINUABLE_WITH_NO_EXCEPTIONS)
|
||||||
promise_.set_exception(error);
|
promise_.set_exception(error);
|
||||||
#else
|
#else
|
||||||
|
(void)error;
|
||||||
|
|
||||||
// Can't forward a std::error_condition or custom error type
|
// Can't forward a std::error_condition or custom error type
|
||||||
// to a std::promise. Handle the error first in order
|
// to a std::promise. Handle the error first in order
|
||||||
// to prevent this trap!
|
// to prevent this trap!
|
||||||
|
|||||||
@ -50,10 +50,12 @@ static auto supply_test_exception() {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
struct my_error_category : std::error_category {
|
struct my_error_category : std::error_category {
|
||||||
const char* name() const override noexcept {return "generic name"}
|
const char* name() const noexcept override {
|
||||||
|
return "generic name";
|
||||||
|
}
|
||||||
|
|
||||||
std::string message(int) const override {
|
std::string message(int) const override {
|
||||||
return "generic"
|
return "generic";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user