26#include <wx/translation.h>
33 return wxString( wxS(
"IO_ERROR: " ) ) +
Problem() + wxS(
"\n\n" ) +
Where();
54 const char* aThrowersFunction,
int aThrowersLineNumber )
60 wxString srcname = aThrowersFile;
64 where.Printf( wxS(
"from %s : %s() line %d" ),
65 srcname.AfterLast(
'/' ),
66 wxString( aThrowersFunction ),
67 aThrowersLineNumber );
72 const char* aThrowersFunction,
int aThrowersLineNumber,
73 const wxString& aSource,
const char* aInputLine,
int aLineNumber,
78 problem.Printf(
_(
"%s in '%s', line %d, offset %d." ),
90 wxString srcname = aThrowersFile;
94 where.Printf( wxS(
"from %s : %s() line %d" ),
95 srcname.AfterLast(
'/' ),
96 wxString( aThrowersFunction ),
97 aThrowersLineNumber );
102 const wxString& aRequiredGenerator )
109 problem.Printf(
_(
"KiCad was unable to open this file because it was created with a more "
110 "recent version than the one you are running.\n\n"
111 "To open it you will need to upgrade KiCad to a version dated %s or "
117 problem.Printf(
_(
"KiCad was unable to open this file because it was created with a more "
118 "recent version than the one you are running.\n\n"
119 "To open it you will need to upgrade KiCad to version %s or "
120 "later (file format dated %s or later)." ),
121 aRequiredGenerator, aRequiredVersion );
127 const wxString& aRequiredGenerator ) :
130 init( aRequiredVersion, aRequiredGenerator );
138 const wxString& aRequiredVersion,
139 const wxString& aRequiredGenerator ) :
150 init( aRequiredVersion, aRequiredGenerator );
152 if( !aParseError.
Problem().IsEmpty() )
153 problem += wxS(
"\n\n" ) +
_(
"Full error text:" ) + wxS(
"\n" ) + aParseError.
Problem();
void init(const wxString &aProblem, const char *aThrowersFile, const char *aThrowersFunction, int aThrowersLineNumber)
virtual const wxString What() const
A composite of Problem() and Where()
virtual const wxString Problem() const
what was the problem?
virtual const wxString Where() const
where did the Problem() occur?
A filename or source description, a problem input line, a line number, a byte offset,...
int lineNumber
at which line number, 1 based index.
std::string inputLine
problem line of input [say, from a LINE_READER].
int byteIndex
at which byte offset within the line, 1 based index
void init(const wxString &aProblem, const char *aThrowersFile, const char *aThrowersFunction, int aThrowersLineNumber, const wxString &aSource, const char *aInputLine, int aLineNumber, int aByteIndex)