from typing import Optional


class CannotAddProductWithMandatoryCustomizationOnTotal(Exception):

    def __init__(
        self,               # type: CannotAddProductWithMandatoryCustomizationOnTotal
        part_code,          # type: int
        part_name=None,     # type: Optional[str]
    ):
        # type: (...) -> None
        super(CannotAddProductWithMandatoryCustomizationOnTotal, self).__init__(part_code)

        self.part_code = part_code
        self.part_name = part_name

    @staticmethod
    def get_error_code():
        # type: (...) -> str

        return "ADD_PRODUCT_WITH_MANDATORY_CUSTOMIZATION_ON_TOTAL"
