| 20 | } |
| 21 | |
| 22 | void AudacityException::EnqueueAction( |
| 23 | std::exception_ptr pException, |
| 24 | std::function<void(AudacityException*)> delayedHandler) |
| 25 | { |
| 26 | BasicUI::CallAfter( [ |
| 27 | pException = std::move(pException), delayedHandler = std::move(delayedHandler) |
| 28 | ] { |
| 29 | try { |
| 30 | std::rethrow_exception(pException); |
| 31 | } |
| 32 | catch( AudacityException &e ) |
| 33 | { delayedHandler( &e ); } |
| 34 | } ); |
| 35 | } |
| 36 | |
| 37 | wxAtomicInt sOutstandingMessages {}; |
| 38 |