TUSST — the Stroop SigilTUSST
journeyforgecampaignadvanced
sign in
‹ advanced path

Errors That Survive Production

Result end to end: propagation, conversion, custom error types that carry cause, and an explicit policy for when a panic is correct and when it is an outage.

serves: Ownership of production infrastructure6 lessons · ~3h
progress0/6
Start track

// lessons

  1. 01

    Result and the ? Operator

    Propagate failure without a single match statement.

  2. 02

    Custom Error Types

    Model your failures as an enum instead of a String.

  3. 03

    From, Into & Automatic Conversion

    Make ? convert a foreign error into yours for free.

  4. 04

    Display, Debug & std::error::Error

    Write the two messages an error owes you: the operator's and the log's.

  5. 05

    Error Chaining & source()

    Keep the cause attached so a log line ends an investigation.

  6. 06

    When panic! Is Correct

    Draw the line between a bug and a condition — and stop unwrapping across it.

Every exercise compiles and runs in the Forge sandbox — standard library only, no external crates.

TUSST · The Ultimate Stellar Supreme Tutorial

learn rust → master stellar · open-source