better XRC errors reporting: report location of the error and use unified formatting

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-03-15 10:29:14 +00:00
parent 95fb31530e
commit 819559b2ac
18 changed files with 351 additions and 75 deletions

View File

@@ -261,6 +261,13 @@ public:
{ return GetResourceNodeAndLocation(name, wxString(), true); }
protected:
// reports input error at position 'context'
void ReportError(wxXmlNode *context, const wxString& message);
// override this in derived class to customize errors reporting
virtual void DoReportError(const wxString& xrcFile, wxXmlNode *position,
const wxString& message);
// Scans the resources list for unloaded files and loads them. Also reloads
// files that have been modified since last loading.
bool UpdateResources();
@@ -529,6 +536,13 @@ protected:
#if wxUSE_FILESYSTEM
wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); }
#endif
// reports input error at position 'context'
void ReportError(wxXmlNode *context, const wxString& message);
// reports input error at m_node
void ReportError(const wxString& message);
// reports input error when parsing parameter with given name
void ReportParamError(const wxString& param, const wxString& message);
};