Commit 9d363eed authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

make error msg more verbose

parent a3d99dff
...@@ -24,7 +24,7 @@ declare namespace xhtml="http://www.w3.org/1999/xhtml"; ...@@ -24,7 +24,7 @@ declare namespace xhtml="http://www.w3.org/1999/xhtml";
: @param $uri – a textgrid uri : @param $uri – a textgrid uri
: @param $sid – a valid sessionId for TextGrid : @param $sid – a valid sessionId for TextGrid
: :) : :)
declare function tgconnect:publish( $uri as xs:string, $sid as xs:string ) declare function tgconnect:publish( $uri as xs:string, $sid as xs:string )
{ {
tgconnect:publish tgconnect:publish
( (
...@@ -120,7 +120,7 @@ declare function tgconnect:publish( $uri as xs:string, ...@@ -120,7 +120,7 @@ declare function tgconnect:publish( $uri as xs:string,
let $data := let $data :=
try { tgclient:getData($pubUri, $tgcrudUrl, $sid) } try { tgclient:getData($pubUri, $tgcrudUrl, $sid) }
catch * { error( QName("https://sade.textgrid.de/ns/error", "PUBLISH03"), catch * { error( QName("https://sade.textgrid.de/ns/error", "PUBLISH03"),
"getData failed with " || $err:code || ": " || $err:description "getData failed for " || $pubUri || " with " || $err:code || ": " || $err:description
|| "Is your file conform to XML standard?") } || "Is your file conform to XML standard?") }
let $name := (: JING requires :) let $name := (: JING requires :)
if($data/*/namespace-uri() = "http://relaxng.org/ns/structure/1.0") if($data/*/namespace-uri() = "http://relaxng.org/ns/structure/1.0")
...@@ -129,7 +129,7 @@ declare function tgconnect:publish( $uri as xs:string, ...@@ -129,7 +129,7 @@ declare function tgconnect:publish( $uri as xs:string,
let $store := let $store :=
try { xmldb:store($targetPath||"/data", $name, $data, "text/xml") } try { xmldb:store($targetPath||"/data", $name, $data, "text/xml") }
catch * { error( QName("https://sade.textgrid.de/ns/error", "PUBLISH04"), catch * { error( QName("https://sade.textgrid.de/ns/error", "PUBLISH04"),
"storing the data failed with " || $err:code || ": " || $err:description "storing the data for "|| $name ||" failed with " || $err:code || ": " || $err:description
|| "Is your file conform to XML standard? Typical mistakes are empty xml:id attributes.") } || "Is your file conform to XML standard? Typical mistakes are empty xml:id attributes.") }
let $render := (: this is where you can start with prerendering. let $render := (: this is where you can start with prerendering.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment