| 15 | } |
| 16 | |
| 17 | TranslatableString InconsistencyException::ErrorMessage() const |
| 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 |
| 28 | XO("Internal error in %s at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/.") |
| 29 | .Format( func, path, line ); |
| 30 | #else |
| 31 | return |
| 32 | XO("Internal error at %s line %d.\nPlease inform the Audacity team at https://forum.audacityteam.org/.") |
| 33 | .Format( path, line ); |
| 34 | #endif |
| 35 | } |