Audacity  2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
InconsistencyException Class Referencefinal

#include <InconsistencyException.h>

Inheritance diagram for InconsistencyException:
MessageBoxException AudacityException

Public Member Functions

 InconsistencyException ()
 
 InconsistencyException (const char *fn, const char *f, unsigned l)
 
 InconsistencyException (InconsistencyException &&that)
 
InconsistencyExceptionoperator= (InconsistencyException &&that)
 
 ~InconsistencyException () override
 
unsigned GetLine () const
 
- Public Member Functions inherited from AudacityException
 AudacityException ()
 
virtual ~AudacityException ()=0
 

Private Member Functions

wxString ErrorMessage () const override
 

Private Attributes

const char * func {}
 
const char * file {}
 
unsigned line {}
 

Additional Inherited Members

- Protected Member Functions inherited from MessageBoxException
 MessageBoxException (const wxString &caption=wxString{})
 
 ~MessageBoxException () override
 
 MessageBoxException (const MessageBoxException &)
 
MessageBoxExceptionoperator= (MessageBoxException &&)
 
- Protected Member Functions inherited from AudacityException
 AudacityException (AudacityException &&)
 
 AudacityException (const AudacityException &)=default
 
AudacityExceptionoperator= (AudacityException &&)
 
AudacityExceptionoperator= (const AudacityException &) PROHIBITED
 

Detailed Description

Definition at line 18 of file InconsistencyException.h.

Constructor & Destructor Documentation

InconsistencyException::InconsistencyException ( )
inline

Definition at line 21 of file InconsistencyException.h.

21 {}
InconsistencyException::InconsistencyException ( const char *  fn,
const char *  f,
unsigned  l 
)
inlineexplicit

Definition at line 24 of file InconsistencyException.h.

References _().

25  : MessageBoxException{ _("Internal Error") }
26  , func { fn }, file { f }, line { l }
27  {}
_("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 ...
InconsistencyException::InconsistencyException ( InconsistencyException &&  that)
inline

Definition at line 29 of file InconsistencyException.h.

30  : MessageBoxException(std::move(that))
31  , func{ that.func }
32  , file{ that.file }
33  , line{ that.line }
34  {}
MessageBoxException(const wxString &caption=wxString{})
InconsistencyException::~InconsistencyException ( )
override

Definition at line 13 of file InconsistencyException.cpp.

14 {
15 }

Member Function Documentation

wxString InconsistencyException::ErrorMessage ( ) const
overrideprivatevirtual

Implements MessageBoxException.

Definition at line 17 of file InconsistencyException.cpp.

References _(), file, func, and line.

18 {
19  // Shorten the path
20  wxString path { file };
21  auto sub = wxString{ wxFILE_SEP_PATH } + "src" + wxFILE_SEP_PATH;
22  auto index = path.Find(sub);
23  if (index != wxNOT_FOUND)
24  path = path.Mid(index + sub.size());
25 
26 #ifdef __func__
27  return wxString::Format(
28 _("Internal error in %s at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/."),
29  func, path, line
30  );
31 #else
32  return wxString::Format(
33 _("Internal error at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/."),
34  path, line
35  );
36 #endif
37 }
_("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
unsigned InconsistencyException::GetLine ( ) const
inline

Definition at line 48 of file InconsistencyException.h.

References line.

48 { return line; }
InconsistencyException& InconsistencyException::operator= ( InconsistencyException &&  that)
inline

Definition at line 35 of file InconsistencyException.h.

References file, func, line, and MessageBoxException::operator=().

36  {
37  if (this != &that) {
38  MessageBoxException::operator= (std::move(that));
39  func = that.func;
40  file = that.file;
41  line = that.line;
42  }
43  return *this;
44  }
MessageBoxException & operator=(MessageBoxException &&)

Member Data Documentation

const char* InconsistencyException::file {}
private

Definition at line 55 of file InconsistencyException.h.

Referenced by ErrorMessage(), and operator=().

const char* InconsistencyException::func {}
private

Definition at line 54 of file InconsistencyException.h.

Referenced by ErrorMessage(), and operator=().

unsigned InconsistencyException::line {}
private

Definition at line 56 of file InconsistencyException.h.

Referenced by ErrorMessage(), GetLine(), and operator=().


The documentation for this class was generated from the following files: