File size: 516 Bytes
3de7bf6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Custom Exception Class for Mismatch Detection (MisMatchError)."""

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0


class MisMatchError(Exception):
    """Exception raised when a mismatch is detected.

    Attributes:
        message (str): Explanation of the error.
    """

    def __init__(self, message: str = "") -> None:
        if message:
            self.message = message
        else:
            self.message = "Mismatch detected."
        super().__init__(self.message)