Better error messages when throwing an io error or parse error.

Only the name of the .cpp file throwing the error instead of its full path is printed, like in master branch.
This commit is contained in:
jean-pierre charras
2017-06-04 11:15:45 +02:00
parent 683da9acd1
commit 17c8198c05
+2 -2
View File
@@ -100,7 +100,7 @@ std::string StrPrintf( const char* format, ... )
void IO_ERROR::init( const char* aThrowersFile, const char* aThrowersLoc, const wxString& aMsg )
{
errorText.Printf( IO_FORMAT, aMsg.GetData(),
wxString::FromUTF8( aThrowersFile ).GetData(),
wxString::FromUTF8( aThrowersFile ).AfterLast( '/' ).GetData(),
wxString::FromUTF8( aThrowersLoc ).GetData() );
}
@@ -117,7 +117,7 @@ void PARSE_ERROR::init( const char* aThrowersFile, const char* aThrowersLoc,
errorText.Printf( PARSE_FORMAT, aMsg.GetData(), aSource.GetData(),
aLineNumber, aByteIndex,
wxString::FromUTF8( aThrowersFile ).GetData(),
wxString::FromUTF8( aThrowersFile ).AfterLast( '/' ).GetData(),
wxString::FromUTF8( aThrowersLoc ).GetData() );
}