Audacity  2.2.2
InconsistencyException.cpp
Go to the documentation of this file.
1 //
2 // InconsistencyException.cpp
3 //
4 //
5 // Created by Paul Licameli on 11/27/16.
6 //
7 //
8 
9 #include "Audacity.h"
10 #include "InconsistencyException.h"
11 #include "Internat.h"
12 
14 {
15 }
16 
17 std::unique_ptr< AudacityException > InconsistencyException::Move()
18 {
19  return std::unique_ptr< AudacityException >
20  { safenew InconsistencyException{ std::move( *this ) } };
21 }
22 
24 {
25  // Shorten the path
26  wxString path { file };
27  auto sub = wxString{ wxFILE_SEP_PATH } + "src" + wxFILE_SEP_PATH;
28  auto index = path.Find(sub);
29  if (index != wxNOT_FOUND)
30  path = path.Mid(index + sub.size());
31 
32 #ifdef __func__
33  return wxString::Format(
34 _("Internal error in %s at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/."),
35  func, path, line
36  );
37 #else
38  return wxString::Format(
39 _("Internal error at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/."),
40  path, line
41  );
42 #endif
43 }
wxString ErrorMessage() const override
#define safenew
Definition: Audacity.h:223
std::unique_ptr< AudacityException > Move() override
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)