error-dump ( heading vocabs-file messages-file -- xml )


Vocabulary
mason.report

Inputs
headingan object
vocabs-filean object
messages-filean object


Outputs
xmlan object


Definition


: error-dump ( heading vocabs-file messages-file -- xml )
[ eval-file ] dip over empty?
[ 3drop f ] [
[ ] [
[
1 nenum
T{ xml-chunk { seq ~vector~ } } interpolate-xml
] map 1 nenum
T{ xml-chunk { seq V{ "" ~tag~ "" } } }
interpolate-xml
] [ utf8 file-contents ] tri* 3 nenum T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ children ~vector~ }
}
" "
T{ interpolated { var 1 } }
" Details: "
T{ tag
{ name ~name~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml
] if ;