HighlightException

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

message

Human-readable description of the failure.

cause

The underlying throwable that triggered this exception, if any.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Thrown when jsoup fails to parse the HTML returned by Highlight.js.

Link copied to clipboard

Thrown when a JavaScript engine call (e.g. highlightCode, listLanguages, hljsVersion) returns null or raises an error.

Link copied to clipboard

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).

Link copied to clipboard

Thrown when a highlight call does not complete within TIMEOUT_SECONDS seconds.

Link copied to clipboard

Thrown when the hidden WebView cannot be created or its bridge page fails to load.

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?