xml/json parse error location in catch clause
Bug #1111786 reported by
Matthias Brantner
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
High
|
Paul J. Lucas |
Bug Description
There should be a way to retrieve the error location of a xml/json parser error in a XQuery catch clause.
One way of doing this would be to always declare and eventually bind the following variables:
$zerr:data-line, $zerr:data-column, $zerr:data-uri
For non-parser related errors, those variables would be bound to the empty sequence.
Alternatively, there could be only one variable $zerr:data-error which is bound to
either the empty sequence, an xml element, or a json object.
Related branches
lp:~zorba-coders/zorba/bug-1111786
- Matthias Brantner: Approve
- Paul J. Lucas: Approve
-
Diff: 1142 lines (+660/-99)26 files modifiedChangeLog (+1/-0)
doc/zorba/errors_warnings.dox (+62/-9)
include/zorba/internal/diagnostic.h (+24/-0)
include/zorba/xquery_exception.h (+75/-0)
src/compiler/codegen/plan_visitor.cpp (+9/-0)
src/compiler/expression/expr.h (+3/-0)
src/compiler/translator/translator.cpp (+14/-1)
src/diagnostics/diagnostic.cpp (+9/-0)
src/diagnostics/diagnostic_en.xml (+4/-0)
src/diagnostics/pregenerated/dict_en.cpp (+1/-0)
src/diagnostics/pregenerated/dict_zed_keys.h (+1/-0)
src/diagnostics/xquery_exception.cpp (+52/-0)
src/diagnostics/xquery_exception.h (+106/-0)
src/runtime/core/trycatch.cpp (+88/-0)
src/runtime/core/trycatch.h (+3/-0)
src/runtime/json/common.cpp (+10/-0)
src/runtime/json/common.h (+7/-0)
src/runtime/json/json_impl.cpp (+53/-25)
src/runtime/json/json_loader.cpp (+69/-40)
src/store/naive/loader_fast.cpp (+26/-24)
test/rbkt/ExpQueryResults/zorba/error/data-location-json-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/error/data-location-xml-1.xml.res (+1/-0)
test/rbkt/Queries/zorba/error/data-location-json-1.xq (+23/-0)
test/rbkt/Queries/zorba/error/data-location-xml-1.xq (+13/-0)
test/rbkt/Queries/zorba/error/data-location.json (+3/-0)
test/rbkt/Queries/zorba/error/data-location.xml (+2/-0)
Changed in zorba: | |
status: | New → Incomplete |
status: | Incomplete → In Progress |
Changed in zorba: | |
milestone: | 3.0 → 2.9 |
Changed in zorba: | |
status: | In Progress → Fix Committed |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Can you remind me what the relevant file(s) are again? I.e., the one with the enum that needs to be augmented?