Skip to content

feat: implement exception hierarchy and ExceptionTranslator#2

Open
thalleslmF wants to merge 3 commits into
mainfrom
feature/exception-hierarchy
Open

feat: implement exception hierarchy and ExceptionTranslator#2
thalleslmF wants to merge 3 commits into
mainfrom
feature/exception-hierarchy

Conversation

@thalleslmF

Copy link
Copy Markdown
Owner

Summary

Implements the exception hierarchy as defined in the spec.

Changes

  • OrmException - Base exception class
  • EntityValidationException - @Entity/@id validation
  • EntityNotFoundException - Find() returns zero rows
  • DuplicateKeyException - SQLState 23505
  • DatabaseException - Wrapper for SQLExceptions
  • ExceptionTranslator - SQLException to ORM exception mapping

hermes added 3 commits April 12, 2026 02:27
- Add OrmException as base exception class
- Add EntityValidationException for entity structure validation errors
- Add EntityNotFoundException for Find() with zero rows
- Add DuplicateKeyException for UNIQUE/PK constraint violations (SQLState 23505)
- Add DatabaseException to wrap unexpected SQLExceptions
- Add ExceptionTranslator to map SQLException to typed ORM exceptions

Implements exception hierarchy from spec:
- RuntimeException -> OrmException -> EntityValidationException
- OrmException -> EntityNotFoundException
- OrmException -> DuplicateKeyException
- OrmException -> DatabaseException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant