Open thatnerdjosh opened 3 months ago
@hughcrt - for review :)
@hughcrt - note - this PR is made with the intention on being able to act on (from the end user side) error conditions in Lunary.
When reviewing, please consider this. It's less about re-raising, or specific implementation details, and more about the ability to act on error conditions directly rather than side effects thereof.
Closing
Context: When loading a prompt from Lunary, it would output an error without letting me know which template it is. I saw there was an Exception raised, it was just being contained within the library. This allows the user to do as they wish with error handling.
Feel free to adjust as necessary - re-raising in every scenario probably isn't ideal - I kept the scope of the changes to the
__init__.py
and limited to what seemed to be public interface.TemplateNotFoundError
.logger
across the board..editorconfig
for formatting.