aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/core/errors.py
blob: d2356c2a59ac8d0f3e7c40ac66d63e965bef4aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""MLIA exceptions module."""


class ConfigurationError(Exception):
    """Configuration error."""


class InternalError(Exception):
    """Internal error."""


class FunctionalityNotSupportedError(Exception):
    """Functionality is not supported error."""

    def __init__(self, reason: str, description: str) -> None:
        """Init exception."""
        super().__init__(f"{reason}: {description}")

        self.reason = reason
        self.description = description