1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-05 23:19:06 +02:00

A redundant high-level GuardedCall around macro command execution...

... Redundant with the guard already in ApplyAndSendResponse, but this makes it
easier to reason about the exception safety of calls into Audacity from
Nyquist tools.
This commit is contained in:
Paul Licameli 2018-09-24 14:15:44 -04:00
parent 4710d69f4c
commit 7c924012fb

View File

@ -53,7 +53,10 @@ void CommandHandler::OnReceiveCommand(AppCommandEvent &event)
// Then apply it to current application & project. Note that the // Then apply it to current application & project. Note that the
// command may change the context - for example, switching to a // command may change the context - for example, switching to a
// different project. // different project.
cmd->Apply(*mCurrentContext); auto result = GuardedCall<bool>( [&] {
return cmd->Apply(*mCurrentContext);
});
wxUnusedVar(result);
// Redraw the project // Redraw the project
mCurrentContext->GetProject()->RedrawProject(); mCurrentContext->GetProject()->RedrawProject();