diff options
author | Marius <mariausol@gmail.com> | 2012-09-11 22:00:16 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-09-11 22:00:16 +0300 |
commit | 0f82c3f6ef101a553b3f28d9f9d8cb905106eec2 (patch) | |
tree | 1a12df692bdbf94bc21028725493d867dfc68a39 /tex/context/base/lxml-tab.lua | |
parent | 40012d63f567ccc7ce33e0307069f35926fc5d6a (diff) | |
download | context-0f82c3f6ef101a553b3f28d9f9d8cb905106eec2.tar.gz |
beta 2012.09.11 20:36
Diffstat (limited to 'tex/context/base/lxml-tab.lua')
-rw-r--r-- | tex/context/base/lxml-tab.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index 9a6ac9082..4ef019075 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -721,7 +721,12 @@ local function _xmlconvert_(data, settings) else errorhandler = errorhandler or xml.errorhandler if errorhandler then - xml.errorhandler(format("load error: %s",errorstr)) + local currentresource = settings.currentresource + if currentresource and currentresource ~= "" then + xml.errorhandler(format("load error in [%s]: %s",currentresource,errorstr)) + else + xml.errorhandler(format("load error: %s",errorstr)) + end end end else @@ -766,7 +771,7 @@ function xmlconvert(data,settings) if ok then return result else - return _xmlconvert_("") + return _xmlconvert_("",settings) end end @@ -827,7 +832,10 @@ function xml.load(filename,settings) elseif filename then -- filehandle data = filename:read("*all") end - return xmlconvert(data,settings) + settings.currentresource = filename + local result = xmlconvert(data,settings) + settings.currentresource = nil + return result end --[[ldx-- |