CompilerError

Swift
public struct CompilerError: Swift.Error, CustomStringConvertible, Sendable

Thrown as an error after a failed compilation.


Topics

var message: String

A message describing the reason for the failure.

Declaration
Swift
public let message: String

var span: Span?

Optionally, the section of stylesheet that triggered the failure.

Declaration
Swift
public let span: Span?

var stackTrace: String?

The stack trace through the compiler input stylesheets that led to the failure.

Declaration
Swift
public let stackTrace: String?

var messages: [CompilerMessage]

Any compiler diagnostics found before the error.

Declaration
Swift
public let messages: [CompilerMessage]

var loadedURLs: [URL]

The canonical URLs of all source files used before the compilation failed.

If the compilation fails while attempting to import a file after determining its canonical URL then that file’s URL is included in the list.

This includes the URL of the initial Sass file if it is known.

Declaration
Swift
public let loadedURLs: [URL]

var description: String

A rich multi-line user-readable description of this error, containing message, span, and stackTrace, but not messages. This is provided by the underlying Sass compiler, format controlled using CompilerMessageStyle.

Declaration
Swift
public let description: String