1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

Don't need AudacityException::Move, use std::exception_ptr

This commit is contained in:
Paul Licameli
2018-04-16 14:16:11 -04:00
parent f7515c90d8
commit ac373502a9
11 changed files with 11 additions and 50 deletions

View File

@@ -1083,7 +1083,7 @@ bool AudacityApp::OnExceptionInMainLoop()
// Use CallAfter to delay this to the next pass of the event loop,
// rather than risk doing it inside stack unwinding.
auto pProject = ::GetActiveProject();
std::shared_ptr< AudacityException > pException { e.Move().release() };
auto pException = std::current_exception();
CallAfter( [=] // Capture pException by value!
{
@@ -1097,7 +1097,9 @@ bool AudacityApp::OnExceptionInMainLoop()
pProject->RedrawProject();
// Give the user an alert
pException->DelayedHandlerAction();
try { std::rethrow_exception( pException ); }
catch( AudacityException &e )
{ e.DelayedHandlerAction(); }
} );