Source code for shuup.core.excs

# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from shuup.utils.excs import Problem


[docs]class ImmutabilityError(ValueError): pass
[docs]class NoShippingAddressException(Exception): pass
[docs]class NoProductsToShipException(Exception): pass
[docs]class NoPaymentToCreateException(Exception): pass
[docs]class NoRefundToCreateException(Exception): pass
[docs]class RefundArbitraryRefundsNotAllowedException(Exception): pass
[docs]class RefundExceedsAmountException(Exception): pass
[docs]class RefundExceedsQuantityException(Exception): pass
[docs]class InvalidRefundAmountException(Exception): pass
[docs]class MissingSettingException(Exception): pass
[docs]class ProductNotOrderableProblem(Problem): pass
[docs]class ProductNotVisibleProblem(Problem): pass
[docs]class ImpossibleProductModeException(ValueError): def __init__(self, message, code=None): super(ImpossibleProductModeException, self).__init__(message) self.code = code