Skip to content

refactor: hamilton.exceptions #1181

Open
@zilto

Description

@zilto

Given the increasing complexity of the library, it could be valuable to create custom exceptions rather than generic ValueError and KeyError.

This helps with:

  • readability: the name of the exception is informative EdgeTypeMismatchException, UnknownNodeException, MaterializationError
  • maintainability: the exceptions can be gradually improved by modifying the message in a central place instead of attaching custom messages to individual KeyError around the codebase
  • debugging: maintainers and users can make a better use of the debugger and exception handling to debug and test their code

related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions