Table of Contents

Errors

Typhon's unified error model: a single-rooted exception hierarchy with numeric error codes and an IsTransient retry hint, finite per-subsystem timeouts that replace infinite hangs, ExhaustionPolicy-driven bounded-resource failures, and a DEBUG-only declared-access validator. For expected non-error outcomes on hot paths, a zero-allocation Result<TValue,TStatus> struct replaces exceptions entirely β€” retrying is always the caller's decision, the engine never retries on its own.

πŸ”¬ Recommended: read in-depth-overview/14-errors.md (Chapter 14: Errors) first to understand the overall design and concepts behind this category, before diving into the specific features below.

Public Features

Feature Summary Status Level
TyphonException Hierarchy & Catalog Base TyphonException (ErrorCode + virtual IsTransient) rooted hierarchy giving callers three catch granularities, with a living catalog of every concrete exception type and a caller-owns-retry philosophy βœ… Implemented πŸ”΅ Core
IsTransient Retry Hint A virtual IsTransient flag on every TyphonException hinting whether a retry might succeed, without the engine ever retrying on the caller's behalf βœ… Implemented πŸ”΅ Core
Timeout Exceptions & Deadline Propagation Configurable, finite deadlines (TimeoutOptions, WaitContext) replace infinite-wait lock primitives, converting hangs into typed TyphonTimeoutException subclasses plus a bulk-load checkpoint timeout βœ… Implemented πŸ”΅ Core
Error Code Classification A numeric TyphonErrorCode per failure, grouped into subsystem ranges (1xxx-8xxx) for logging/metrics dashboards β€” the exception type, not the code, is what callers catch on βœ… Implemented 🟣 Advanced
Resource Exhaustion Handling ExhaustionPolicy metadata (FailFast/Wait/Evict/Degrade) documents how the engine reacts when a bounded resource is full β€” FailFast throws a structured ResourceExhaustedException (IsTransient=true), Wait resources throw a bounded TyphonTimeoutException subclass, never an unbounded hang or InvalidOperationException βœ… Implemented 🟣 Advanced
Storage & Corruption Exceptions Typed failures for storage I/O, CRC32C page corruption (unhealable), and another-process database-file-lock detection βœ… Implemented 🟣 Advanced
Durability (WAL / BulkLoad / Commit) Exceptions Typed, fail-fast failures from the WAL writer, the commit pipeline's durability wait, and BulkLoad session lifecycle βœ… Implemented 🟣 Advanced
Schema & Constraint Violation Exceptions Engine-refuses-to-proceed failures for the data model: breaking schema mismatch, migration failure, revision downgrade, duplicate unique key βœ… Implemented 🟣 Advanced
Runtime/Scheduler Declared-Access Validation DEBUG-only InvalidAccessException when a system writes a component it never declared via Writes<T>()/SideWrites<T>(), compiled out in RELEASE βœ… Implemented 🟣 Advanced

Internal Features

Feature Summary Status
Result<TValue,TStatus> Hot-Path Result Type Zero-allocation dual-generic result struct for hot-path lookups that expect a miss β€” no exceptions, no boxing, no branch on access; used internally by B+Tree/MVCC hot paths, not surfaced through Transaction/Query call sites βœ… Implemented