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:
+2
-2
@@ -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() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user