-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Currently it seems there's no concrete way to be sure a template is valid before you throw data at it. The library currently seems to prefer swallowing errors and returning empty values and maybe logging errors.
as a standalone utility this is reasonable, but for my use case it's unpleasant.
I'm writing code that is going to maintain a library of templates, users can add/remove templates and it'd be very handy if I could explicitly reject obviously invalid templates at the start, rather than waiting for users to try and use them.
Perhaps I can just check the template to see if it's empty, or watch the log stream somehow, but both of those feel pretty messy.
Would you be open to a PR adding a 'strict' parameter making sure most exceptions are raised to the caller, rather than being caught and logged?