Highlight Exception
Exception hierarchy for compose-highlight engine failures.
All public HighlightEngine methods return Result<T> and wrap failures in one of these subtypes rather than throwing directly. Catch HighlightException to handle all engine errors in one place, or match individual subtypes for fine-grained handling.
Parameters
Human-readable description of the failure.
The underlying throwable that triggered this exception, if any.
Inheritors
Types
Thrown when the HTML parser fails to parse the HTML returned by Highlight.js.
Thrown when a JavaScript engine call (e.g. highlightCode, listLanguages, hljsVersion) returns null or raises an error.
Thrown when a theme CSS asset is found but produces no parseable color rules (e.g. the file is empty or contains only unsupported CSS).
Thrown when a highlight call does not complete within TIMEOUT_SECONDS seconds.
Thrown when the hidden WebView cannot be created or its bridge page fails to load.