2020-08-25 14:06:08 +00:00
|
|
|
/*!
|
|
|
|
@file InconsistencyException.cpp
|
|
|
|
@brief Implements InconsistencyException
|
|
|
|
|
|
|
|
|
|
|
|
Created by Paul Licameli on 11/27/16.
|
|
|
|
|
|
|
|
*/
|
2016-11-27 13:39:11 +00:00
|
|
|
|
2021-05-09 15:16:56 +00:00
|
|
|
|
2016-11-27 13:39:11 +00:00
|
|
|
#include "InconsistencyException.h"
|
2018-11-11 02:40:37 +00:00
|
|
|
|
2016-11-27 13:39:11 +00:00
|
|
|
InconsistencyException::~InconsistencyException()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-12-07 15:04:35 +00:00
|
|
|
TranslatableString InconsistencyException::ErrorMessage() const
|
2016-11-27 13:39:11 +00:00
|
|
|
{
|
|
|
|
// 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__
|
2019-12-07 15:04:35 +00:00
|
|
|
return
|
|
|
|
XO("Internal error in %s at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/.")
|
|
|
|
.Format( func, path, line );
|
2016-11-27 13:39:11 +00:00
|
|
|
#else
|
2019-12-07 15:04:35 +00:00
|
|
|
return
|
|
|
|
XO("Internal error at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/.")
|
|
|
|
.Format( path, line );
|
2016-11-27 13:39:11 +00:00
|
|
|
#endif
|
|
|
|
}
|