Audacity 3.2.0
UserException.h
Go to the documentation of this file.
1
9#ifndef __AUDACITY_USER_EXCEPTION__
10#define __AUDACITY_USER_EXCEPTION__
11
12#include "AudacityException.h"
13
15
16class EXCEPTIONS_API UserException final : public AudacityException
17{
18public:
20
21 ~UserException() override;
22
23 void DelayedHandlerAction() override;
24
25 using ProgressReporter = std::function<void(double)>;
26
28 static void WithCancellableProgress(
29 std::function<void(const ProgressReporter&)> action,
31};
32
33#endif
Declare abstract class AudacityException, some often-used subclasses, and GuardedCall.
static const auto title
Base class for exceptions specially processed by the application.
virtual void DelayedHandlerAction()=0
Action to do in the main thread at idle time of the event loop.
Holds a msgid for the translation catalog; may also bind format arguments.
Can be thrown when user cancels operations, as with a progress dialog. Delayed handler does nothing.
Definition: UserException.h:17
std::function< void(double)> ProgressReporter
Definition: UserException.h:25