1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-19 14:17:41 +02:00
audacity/src/InconsistencyException.cpp
Paul Licameli 74e3a6fdba Replace mentions of feedback@audacityteam.org with url of forum...
... There are two in AboutDialog.cpp, but these strings aren't actually used.

There are two in InconsistencyException.cpp, which ought never to be seen by
users, but should be treated as high priority bugs if they are.

There is a very old one in Sequence.cpp, which was never internationalized and
was only written to the log and likewise ought to be eliminated from happening
in pre-release testing.

Therefore, though this is a minor breach of string freeze, it's only the second
one above that users might ever see, and then only if a serious bug escaped.
2017-08-31 17:01:45 -04:00

43 lines
1021 B
C++

//
// InconsistencyException.cpp
//
//
// Created by Paul Licameli on 11/27/16.
//
//
#include "Audacity.h"
#include "InconsistencyException.h"
InconsistencyException::~InconsistencyException()
{
}
std::unique_ptr< AudacityException > InconsistencyException::Move()
{
return std::unique_ptr< AudacityException >
{ safenew InconsistencyException{ std::move( *this ) } };
}
wxString InconsistencyException::ErrorMessage() const
{
// Shorten the path
wxString path { file };
auto sub = wxString{ wxFILE_SEP_PATH } + "src" + wxFILE_SEP_PATH;
auto index = path.Find(sub);
if (index != wxNOT_FOUND)
path = path.Mid(index + sub.size());
#ifdef __func__
return wxString::Format(
_("Internal error in %s at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/."),
func, path, line
);
#else
return wxString::Format(
_("Internal error at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/."),
path, line
);
#endif
}