Class ExtHint
ReferenceError: X is not defined inside a step into an actionable failure —
when X is a global that an ext would have bound, had the project declared it.
An ext registers its globals when karate-boot.js calls boot.ext('<name>')
(rules binds Rule, Schema, …). Leave that line out and every step touching
the global fails with the bare JS error, which names the global but never the declaration that
binds it — so the reader (or an LLM driving the run) hunts for a typo in the feature instead of
adding one line to the boot file.
There is no catalogue of ext names here. Resolution walks BootBinding's own
io.karatelabs.ext.<name>.<Name>Ext convention outward from the missing global, and speaks
only when that class is genuinely on the classpath and the Suite did not already bind the name —
so a hint is never invented for an ext this runtime cannot boot, and an ordinary typo stays an
ordinary typo.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThrowableThe step failure with the boot hint appended, orerroritself when no hint applies — identity is the contract, the caller stores whatever comes back.static StringThe hint line for this failure, or null when it is not a resolvable missing-ext global.
-
Method Details
-
decorate
The step failure with the boot hint appended, orerroritself when no hint applies — identity is the contract, the caller stores whatever comes back. The wrapper keeps the original as its cause and reuses its stack, so nothing about the origin is lost. -
forError
The hint line for this failure, or null when it is not a resolvable missing-ext global.
-