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;
62 where.Printf(
_(
"from %s : %s() line %d" ),
63 srcname.AfterLast(
'/' ),
64 wxString( aThrowersFunction ),
65 aThrowersLineNumber );
70 const char* aThrowersFunction,
int aThrowersLineNumber,
71 const wxString& aSource,
const char* aInputLine,
int aLineNumber,
76 problem.Printf(
_(
"%s in '%s', line %d, offset %d." ),
88 wxString srcname = aThrowersFile;
90 where.Printf(
_(
"from %s : %s() line:%d" ),
91 srcname.AfterLast(
'/' ),
92 wxString( aThrowersFunction ),
93 aThrowersLineNumber );
101 problem.Printf(
_(
"KiCad was unable to open this file because it was created with a more "
102 "recent version than the one you are running.\n\n"
103 "To open it you will need to upgrade KiCad to a version dated %s or "
112 init( aRequiredVersion );
120 const wxString& aRequiredVersion ) :
130 init( aRequiredVersion );
132 if( !aParseError.
Problem().IsEmpty() )
133 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)