Skip to content

Throw an error when a custom template is given but not found #129

@choldgraf

Description

@choldgraf

I found myself confused recently when I was trying to demo creating a custom template in #126 . I'd run Voila with a custom template like --template=mytemplate, and everything would run fine, but the final output was not the HTML I expected.

Right now, this is because Voila simply appends the custom template path to the list of templates it expects. For me, this led to confusion because I was expecting Voila to error if it didn't find my template path. Instead, it just reverted to the default template.

What do folks think about raising an error in this case, rather than reverting to default? I feel like if somebody gives a custom template, they'd rather know that the path wasn't correctly found, rather than have it silently work, but not in the way expected.

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