exception-hierarchies

Community

Craft precise exception hierarchies.

Authoryanko-belov
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill guides you to design robust exception hierarchies so callers catch errors at the right abstraction level and avoid over-broad catches.

Core Features & Use Cases

  • Define a base ApplicationError and Category errors (DomainError, InfrastructureError, ExternalError).
  • Create specific errors such as ValidationError, NotFoundError, and DatabaseError.
  • Wrap third-party errors at boundaries to protect internal details.
  • Use case: Refactor a service to throw domain-specific errors instead of generic failures.

Quick Start

  • Draft a base ApplicationError class.
  • Create at least one DomainError, one InfrastructureError, and one ExternalError subclass.
  • Implement an adapter that wraps library errors at the boundary and translates them into domain errors.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: exception-hierarchies
Download link: https://github.com/yanko-belov/code-craft/archive/main.zip#exception-hierarchies

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.