1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
from __future__ import absolute_import, print_function, division
class DuplicateKeyError(Exception):
def __init__(self, key):
self.key = key
def __str__(self):
return 'duplicate key: %r' % self.key
class FieldSelectionError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return 'selection is not a field or valid field index: %r' % self.value
class ArgumentError(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return 'argument error: %s' % self.message
|