Skip to content
This repository has been archived by the owner on May 3, 2018. It is now read-only.

Handle bad input #2

Open
mnot opened this issue May 11, 2012 · 1 comment
Open

Handle bad input #2

mnot opened this issue May 11, 2012 · 1 comment

Comments

@mnot
Copy link
Member

mnot commented May 11, 2012

We need to figure out the right thing to do when we get bad templates, e.g., "{foo", "}foo{", and so forth.

@tadeck
Copy link

tadeck commented Aug 3, 2012

Maybe you should check it (using regular expression) before using the template and if it is incorrect, you should probably throw your own exception inheriting from ValueError like this:

class BadTemplate(ValueError):
    """
    Exception thrown when the template is incorrect and cannot be supported.
    """
    pass

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants