# Karl O. Pinc <kop@karlpinc.com>
-from pgwui_core.exceptions import SetupError as UploadError
+from pgwui_core.exceptions import SetupError
# Upload related exceptions
-class BadFileFormatError(UploadError):
+class BadFileFormatError(SetupError):
def __init__(self, component, value):
super().__init__(
f'The "pgwui:{component}:file_format" PGWUI setting is ({value}) '
'it must be either "csv" or "tab" or the setting be omitted')
-class NoTableError(UploadError):
+class NoTableError(SetupError):
'''No table uploaded'''
def __init__(self, e, descr='', detail=''):
super(NoTableError, self).__init__(e, descr, detail)
-class BadTableError(UploadError):
+class BadTableError(SetupError):
'''Supplied name does not work for a table or view'''
def __init__(self, e, descr='', detail=''):
super(BadTableError, self).__init__(e, descr, detail)
super(CannotInsertError, self).__init__(e, descr, detail)
-class BadHeadersError(UploadError):
+class BadHeadersError(SetupError):
'''The headers in the uploaded file are bad.'''
def __init__(self, e, descr='', detail=''):
super(BadHeadersError, self).__init__(e, descr, detail)