domain-exception

Installation
SKILL.md

Domain exception handling

Overview

This document defines rules for structuring domain-specific exceptions. Each domain feature defines its own error codes and exception hierarchy under an exception package.

Key Principle: Each domain feature has its own {Feature}Error enum, {Feature}Exception base class, and specific exception subclasses. Use KnownException for expected errors, BizRuntimeException for unexpected errors.

Exception hierarchy

BizRuntimeException (common module, unchecked)
  └── KnownException (common module, no stack trace logged)
        └── {Feature}Exception (domain feature, open class)
              ├── {Feature}NotFoundException
              ├── {Feature}AlreadyExistsException
              └── ... (other feature-specific exceptions)
Installs
1
First Seen
Apr 10, 2026