1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-04 13:40:58 +01:00

Define SimpleMessageBoxException

This commit is contained in:
Paul Licameli
2017-03-24 14:40:39 -04:00
parent d1cbac4181
commit 8e2e4a53b8
2 changed files with 39 additions and 0 deletions

View File

@@ -69,6 +69,30 @@ private:
mutable bool moved { false };
};
// MessageBoxException that shows a given, unvarying string.
class SimpleMessageBoxException /* not final */ : public MessageBoxException
{
public:
explicit SimpleMessageBoxException( const wxString &message_,
const wxString &caption = wxString{} )
: MessageBoxException{ caption }
, message{ message_ }
{}
~SimpleMessageBoxException() override;
SimpleMessageBoxException( const SimpleMessageBoxException& ) = default;
SimpleMessageBoxException &operator = (
SimpleMessageBoxException && ) PROHIBITED;
std::unique_ptr< AudacityException > Move() override;
// Format a default, internationalized error message for this exception.
virtual wxString ErrorMessage() const override;
private:
wxString message;
};
struct DefaultDelayedHandlerAction
{
void operator () (AudacityException *pException) const