Audacity  2.2.2
FileException.h
Go to the documentation of this file.
1 //
2 // FileException.h
3 //
4 //
5 // Created by Paul Licameli on 11/22/16.
6 //
7 //
8 
9 #ifndef __AUDACITY_FILE_EXCEPTION__
10 #define __AUDACITY_FILE_EXCEPTION__
11 
12 #include "AudacityException.h"
13 #include <wx/filename.h>
14 
15 class FileException /* not final */ : public MessageBoxException
16 {
17 public:
18  enum class Cause { Open, Read, Write, Rename };
19 
20  explicit FileException
21  ( Cause cause_, const wxFileName &fileName_,
22  const wxString &caption = _("File Error"),
23  const wxFileName &renameTarget_ = {})
25  , cause{ cause_ }, fileName{ fileName_ }, renameTarget{ renameTarget_ }
26  {}
27 
29  : MessageBoxException(std::move(that))
30  , cause{ that.cause }
31  , fileName{ that.fileName }
32  , renameTarget{ that.renameTarget }
33  {}
34 
36 
37  ~FileException() override;
38 
39 protected:
40  // Format a default, internationalized error message for this exception.
41  wxString ErrorMessage() const override;
42 
43 public:
45  wxFileName fileName;
46  wxFileName renameTarget;
47 };
48 
49 #endif
FileException & operator=(FileException &&) PROHIBITED
#define PROHIBITED
Definition: Audacity.h:224
wxFileName renameTarget
Definition: FileException.h:46
FileException(FileException &&that)
Definition: FileException.h:28
FileException(Cause cause_, const wxFileName &fileName_, const wxString &caption=_("File Error"), const wxFileName &renameTarget_={})
Definition: FileException.h:21
wxFileName fileName
Definition: FileException.h:45
wxString ErrorMessage() const override
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
an AudacityException that pops up a single message box even if there were multiple exceptions of the ...