File: exc.py

package info (click to toggle)
wtforms-alchemy 0.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 492 kB
  • sloc: python: 3,955; makefile: 119; sh: 11
file content (24 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class UnknownTypeException(Exception):
    def __init__(self, column):
        Exception.__init__(
            self, f"Unknown type '{column.type!r}' for column '{column.name}'"
        )


class InvalidAttributeException(Exception):
    def __init__(self, attr_name):
        Exception.__init__(
            self, f"Model does not contain attribute named '{attr_name}'."
        )


class AttributeTypeException(Exception):
    def __init__(self, attr_name):
        Exception.__init__(
            self, f"Model attribute '{attr_name}' is not of type ColumnProperty."
        )


class UnknownConfigurationOption(Exception):
    def __init__(self, option):
        Exception.__init__(self, f"Unknown configuration option '{option}' given.")