Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Interface

Error

interface Error

Module: System
Assembly: System.Runtime.dll
Source file: Error.rvn

Opt-in diagnostics for recoverable failures. Result and propagation do not require this interface.

Implementing types

Documented types in this API reference. Indirect relationships are marked.

Properties

3 items
Cause: Optional<Error> The underlying failure, or None for a leaf error. Defined by Error.Cause · Required implementation (no default).
Message: string A human-readable description; match the concrete error rather than parsing this text. Defined by Error.Message · Required implementation (no default).
StackTrace: Optional<StackTrace> An existing diagnostic snapshot, or None. Reading this property never captures a stack. Defined by Error.StackTrace · Required implementation (no default).

Methods

3 items
Extension member: FormatError() -> string Formats up to 64 error layers and one existing trace; never captures a stack. A longer or cyclic chain ends with a truncation marker. Messages are not machine codes. Extension from ErrorFormattingExtensions.FormatError
Extension member: WithContext(message: string, captureStackTrace: bool) -> ContextError<Error> Adds context, optionally capturing once at this boundary when no cause trace exists. Extension from ErrorExtensions.WithContext
Extension member: WithContext(message: string) -> ContextError<Error> Adds context using the application capture setting (disabled by default). Extension from ErrorExtensions.WithContext