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}Errorenum,{Feature}Exceptionbase class, and specific exception subclasses. UseKnownExceptionfor expected errors,BizRuntimeExceptionfor 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)