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

std::unique_ptr
< AudacityException
Move () override
 
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 23 of file InconsistencyException.cpp.

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

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 }
_("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; }
std::unique_ptr< AudacityException > InconsistencyException::Move ( )
overrideprivatevirtual

Implements AudacityException.

Definition at line 17 of file InconsistencyException.cpp.

References safenew.

18 {
19  return std::unique_ptr< AudacityException >
20  { safenew InconsistencyException{ std::move( *this ) } };
21 }
#define safenew
Definition: Audacity.h:230
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 57 of file InconsistencyException.h.

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

const char* InconsistencyException::func {}
private

Definition at line 56 of file InconsistencyException.h.

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

unsigned InconsistencyException::line {}
private

Definition at line 58 of file InconsistencyException.h.

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


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