Skip to content

TTP doesn't include a mechanism for validating template syntax #136

@wrgeorge1983

Description

@wrgeorge1983

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions