Have SetupError name be consistent between pgwui_core and pgwui_upload_core
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 27 Apr 2021 20:39:47 +0000 (15:39 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 27 Apr 2021 20:39:56 +0000 (15:39 -0500)
src/pgwui_upload_core/exceptions.py

index f62c95fffa1913e750521471784cbca181ef049c..8025357dc8623fb7b68e526ad4ace065118119d0 100644 (file)
 
 # 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)
@@ -61,7 +61,7 @@ class CannotInsertError(BadTableError):
         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)