Source code for locopy.errors

# SPDX-Copyright: Copyright (c) Capital One Services, LLC
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


[docs]class LocopyError(Exception): """ Baseclass for all Locopy errors. """
[docs]class CompressionError(LocopyError): """ Raised when there is an error compressing a file. """
[docs]class LocopySplitError(LocopyError): """ Raised when there is an error splitting a file. """
[docs]class LocopyIgnoreHeaderError(LocopyError): """ Raised when Multiple IGNOREHEADERS are found in copy options. """
[docs]class LocopyConcatError(LocopyError): """ Raised when there is an error concatenating files. """
[docs]class DBError(Exception): """ Base class for all Database errors. """
[docs]class CredentialsError(DBError): """ Raised when the users credentials are not provided. """
[docs]class S3Error(Exception): """ Base class for all S3 errors. """
[docs]class S3CredentialsError(S3Error): """ Raised when there is an error with AWS credentials. """
[docs]class S3InitializationError(S3Error): """ Raised when there is an error initializing S3 client. """
[docs]class S3UploadError(S3Error): """ Raised when there is an upload error to S3. """
[docs]class S3DownloadError(S3Error): """ Raised when there is an download error to S3. """
[docs]class S3DeletionError(S3Error): """ Raised when there is an deletion error on S3. """