Skip to main content

Contract: Error & Finding Code Catalog

One catalog for validator findings and render-time errors. Every code has an actionable message (Label with Comment) stating what failed AND what to do.

Core language & geometry

CodeSeverityConditionMessage must include
LF-XMLErrortemplate/partial is not well-formed XMLparse error detail + location
LF-UNSUPErrorelement/attribute/style value outside the language contractthe construct + pointer to supported set
LF-PARTIALError{{> name}} resolves to nothingpartial name + referencing layout/partial
LF-PARTIAL-PARAMErrora Block include ({{> name param=Value ...}}) leaves one or more of the Block's own {{$name}} placeholders unmappedthe Block name + the unmapped placeholder name(s)
LF-AMBIGErrorunqualified include (or unqualified <img> asset name) matches >1 extensioncandidates with their prefixes + how to qualify
LF-CYCLEErrorinclude chain contains a cyclethe full chain A→B→A
LF-BINDErrorbinding references a data item/column absent from the dataset, or a data-accumulate cell's value doesn't parse as a culture-invariant Decimal, or a format expression's detected kind (Decimal vs. Date) doesn't match the column's actual typebinding text + available names / the offending value
LF-GEOMErrordeclared column widths exceed printable width; margins exceed page; a <region>'s bounds fall partially/fully outside the physical page; an image's resolved dimensions exceed the printable content areathe numbers involved
LF-FMTErrorrequested output format not served (Word/Excel)supported format (PDF) + where to change
LF-PREFIXErrorRegisterSource prefix conflictprefix + owning app
LF-KEEPOVWarningkeep-together group taller than one page (will break normally)group location
LF-CHARSWarningtemplate/static text contains characters outside cp1252 (default Helvetica path only)location; note about ? substitution
LF-COLSPANErrora <tr>'s cell colspan sum (occupancy-adjusted for any active rowspan) ≠ the table's declared column countthe row + actual vs. expected column count
LF-NESTDEPTHErrorcontaining-block nesting depth (table/div/section/td/th boundaries from the document root) exceeds 8the offending element location + the configured limit (8)
LF-ROWSPANOVWarninga rowspan group is estimated taller than one full page's printable content area — same static-estimate/documented-degradation philosophy as LF-KEEPOV; it cannot be kept together and breaks across pages normally insteadgroup location + rowspan count + estimated vs. content-area height
LF-ACCDUPErrorthe same column name is declared with data-accumulate more than once anywhere in the templatethe column name + both declaring locations

Images (<img/>)

CodeSeverityConditionMessage must include
LF-IMGREFErrora static (asset-name or source-qualified) src does not resolve — the name isn't registered, or an unqualified name matches more than one extension's asset (not raised for a {{...}}-bound src — an empty/unresolved bound field simply renders nothing)the asset name + qualification hint
LF-IMGFMTErrorthe image bytes are a container format other than JPEG/PNG (SVG, GIF, BMP, WebP, APNG, etc.)the detected format + supported set
LF-IMGCORRUPTErrorthe bytes claim to be JPEG/PNG but fail to parse or decodethe asset name
LF-IMGSIZEErrora registered image asset is zero bytes or exceeds the 10 MB per-asset limitactual size vs. the limit
LF-GEOMError(reused from the core catalog above) the image's resolved dimensions exceed the page's printable content areathe numbers involved

Fonts & script (font-family, custom font assets)

CodeSeverityConditionMessage must include
LF-FONT-VARIANTErrora template combines font-family with a font-weight/font-style for which no matching style variant (Regular/Bold/Italic/BoldItalic) is registered for that familythe family + the missing variant
LF-FONT-UNRESOLVEDErrora font-family value is outside the registered set (including a misspelled Helvetica) — raised at validation, and again at render time if a reference validation couldn't fully resolve (e.g. an asset deleted between validation and render)the requested family name
LF-FONT-CFFErrora registered font asset embeds CFF/PostScript outlines (an OTTO-flavored OTF) rather than TrueType glyf outlines — the engine embeds glyf-outline fonts onlythe asset name + style variant
LF-FONT-CORRUPTErrora font asset's container isn't a recognized TTF/OTF sfnt, or is missing required glyf/loca or CFF outline tables and can't be parsedthe asset name + style variant
LF-FONT-NOCMAPErrora font asset has no usable Unicode cmap subtable ((3,1)/(0,x)/(3,0)) — the engine can't map codepoints to glyphs without onethe asset name + style variant
LF-FONT-ZEROBYTEErrora font asset upload/registration is 0 bytesthe asset name
LF-FONT-OVERSIZEErrora font asset exceeds the maximum per-asset byte sizeactual size vs. the limit
LF-FONT-GLYPHLIMITErrora template + dataset combination pushes one (family, style-variant) past the 255-distinct-glyph (plus .notdef) ceiling for a single rendered document (single-byte simple-font encoding)the family/variant + distinct-glyph count found vs. the ceiling
LF-SCRIPT-COMPLEXErrortext styled with a custom font-family (not the default Helvetica path) contains a complex-shaping script — Arabic, Hebrew, or an Indic scriptthe offending text/location
LF-SCRIPT-CJKErrortext styled with a custom font-family contains CJK — ideographs, kana, or hangul (deferred pending future composite-font support, distinct reason from LF-SCRIPT-COMPLEX)the offending text/location
LF-SCRIPT-UNCLASSIFIEDErrortext styled with a custom font-family contains a script not yet classified into the in-scope/out-of-scope liststhe offending text/location

These do not apply to the default Helvetica path, which keeps its unconditional cp1252 ?-substitution behavior (LF-CHARS, above) regardless of script. See Template language reference's "Fonts & Typography" section for the full in-scope/out-of-scope script table and the two asset limits.

Barcodes (1D, render-time auto-encode)

CodeSeverityConditionMessage must include
LF-BARCODE-ENCODEErrora run is bound to a font asset coupled to a barcode symbology (Interpreter <> None) and the raw value fails that symbology's Encode — invalid charset, wrong length, or bad check digit — at render timethe font family + symbology + the underlying encode failure text

See the Barcodes guide for how render-time auto-encode works. This is distinct from an error raised by calling Symbology.Encode(...) yourself in a report/dataset column (the manual pre-encode pattern) — that surfaces as an ordinary AL error in your own code, not an LF-* render-time finding.

Shared styles (<style-sheets>, <style>, class)

CodeSeverityConditionMessage must include
LF-STYLEREFErrora <style-sheets src="..."> entry names a stylesheet that is not registered/resolvable, OR an element's class="..." references a class name not defined in any listed stylesheet or the document's own <style> block (a Block/partial has no local styling scope of its own — its elements' class references resolve against the host document's merged sheets + <style> block; see Shared styles)the missing stylesheet/class name + the referencing element/location

Registering a stylesheet (baseline or Tenant override) with an invalid property/value inside any class body reuses the existing LF-UNSUP row above — no new code needed, since it's the identical "value outside an enumeration" failure mode inline styles already produce, just discovered at stylesheet-registration time instead of at template-validation time.

QR codes (<qr/>)

CodeSeverityConditionMessage must include
LF-QR-EMPTYErrorthe <qr> element's resolved value is empty at render timeidentifies the failing <qr> element
LF-QR-OVERFLOWErrorthe resolved value, at its densest available segmentation, needs more bits to encode than version 10's capacity at the requested ec-levelbits needed vs. bits available at that EC level, and the EC level code
LF-QR-MODULESIZEErroran explicit module-size attribute resolves to zero or a negative point valuethe requested module size
LF-QR-BOXTOOSMALLErrorthe <qr> element's available box is too small to draw the resolved matrix (including its mandatory 4-module quiet zone) at even 1pt per modulethe available box dimensions, the matrix dimension, and the total modules-per-side including quiet zone

A <qr> element missing its required value attribute, or holding an invalid ec-level/size/module-size value, is LF-UNSUP (reused from the core catalog above) — the same pattern as img's required src and enumerated fit/align attributes.

Rules

  • Renderer failures surface via ErrorInfo with the code in the message and telemetry event LF0002 carrying the code as a dimension.
  • Validation returns findings (temporary table) — it never throws for template problems.
  • Adding a code means updating this catalog: every catalogued condition has a test proving actionable output, never a silent blank document.