Erbsland Core
  • Getting Started
  • Usage
  • Topics
    • Core
    • Memory
    • Compiled Resources
    • Security Topics
    • Cryptology
    • Text
    • Command Line Options System
    • Exceptions, Errors and Diagnostics
      • Error Handling Overview
      • Reporting Errors with Result
      • Throwing and Handling Exceptions
      • Working with Diagnostic Data
      • Writing Custom Exceptions
    • Filesystem Access and Manipulation
    • Random and Secrets
    • Regular Expressions
    • Event System
    • Logging
    • Streams
    • Network
    • Color Terminal
  • Reference
  • The Story Behind Erbsland Core
  • Development Stages and Versioning
  • Requirements
  • Changelog
  • Guidelines
  • Index
Erbsland Core
  • Topics
  • Exceptions, Errors and Diagnostics
  • View page source

Exceptions, Errors and Diagnostics

Errors become easier to handle when each layer has a clear responsibility. These pages introduce the common failure types in Erbsland Core, show how to preserve useful context while an error travels through your application, and explain how structured diagnostics turn technical failures into helpful messages.

  • Error Handling Overview
    • Choosing How to Report Failure
    • The Common Exception Family
    • Domain-Specific Exceptions
    • From Failure to a Helpful Message
  • Reporting Errors with Result
    • Prefer Named Outcomes over bool
    • Handle Results at the Call Site
    • Create a Custom Result Type
    • Choose Between Result and Exceptions
  • Throwing and Handling Exceptions
    • Catch Errors Where You Can Act
    • Choose the Right Text Interface
    • Preserve the Original Cause
    • Let Application Report the Final Error
  • Working with Diagnostic Data
    • One Exception, One Diagnostic
    • Build a Complete Diagnostic Document
    • Render the Document for Its Destination
    • Display Text and Localization
  • Writing Custom Exceptions
    • Start with the Smallest Useful Type
    • Keep Details in a Context Object
    • Translate Context into a Diagnostic
    • Handle External Text Safely
Previous Next

© Copyright 2026, Tobias Erbsland - Erbsland DEV.

Built with Sphinx using a theme provided by Read the Docs.