mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Make it easier to inspect unhandled asynchronous exceptions in debuggers
This commit is contained in:
parent
7dbf22a2d2
commit
e59e6ae8b9
@ -461,12 +461,23 @@ struct final_callback : util::non_copyable {
|
||||
}
|
||||
|
||||
void operator()(types::dispatch_error_tag, types::error_type error) && {
|
||||
(void)error;
|
||||
#ifndef CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS
|
||||
// There were unhandled errors inside the asynchronous call chain!
|
||||
// Define `CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS` in order
|
||||
// to ignore unhandled errors!"
|
||||
#if defined(CONTINUABLE_HAS_EXCEPTIONS)
|
||||
try {
|
||||
std::rethrow_exception(error);
|
||||
} catch (std::exception const& exception) {
|
||||
(void)exception;
|
||||
util::trap();
|
||||
} catch (...) {
|
||||
util::trap();
|
||||
}
|
||||
#else
|
||||
(void)error;
|
||||
util::trap();
|
||||
#endif
|
||||
#endif // CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user