Error formatting and printing.
Various types of error may occur, and they have different attributes.
Parse errors are returned from limabean-pod as spanned reports, which are internally cross-referenced by span, and require formatting using pod/format-errors.
Plugin errors are returned as :err annotations on directives. The :err annotations are guaranteed to have :span or :span-p fields. The latter reference synthetic spans for any directives which have been inserted or modified by plugins. Modified directives have both :span and :span-p fields. There are no cross-references.
Booking errors are returned from limabean-pod as indexed reports. Tne index is by directive or posting-within-transaction into the list of raw xf directives (as produced by running raw plugins), or raw directives (as returned by the parser) in the case of there being no raw plugins. These may be internally cross-referenced by index to related items. To handle the cross references requires mapping indexes to spans, and then using pod/format-errors. Note that the spans may be synthetic, but these are guaranteed to have been created.
Error formatting and printing. Various types of error may occur, and they have different attributes. Parse errors are returned from limabean-pod as spanned reports, which are internally cross-referenced by span, and require formatting using pod/format-errors. Plugin errors are returned as :err annotations on directives. The :err annotations are guaranteed to have :span or :span-p fields. The latter reference synthetic spans for any directives which have been inserted or modified by plugins. Modified directives have both :span and :span-p fields. There are no cross-references. Booking errors are returned from limabean-pod as indexed reports. Tne index is by directive or posting-within-transaction into the list of raw xf directives (as produced by running raw plugins), or raw directives (as returned by the parser) in the case of there being no raw plugins. These may be internally cross-referenced by index to related items. To handle the cross references requires mapping indexes to spans, and then using pod/format-errors. Note that the spans may be synthetic, but these are guaranteed to have been created.
(print-errors {:keys [error pod]})Print errors if any.
Print errors if any.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |