LogSAD / anomalib /data /errors.py
zhiqing0205
Add core libraries: anomalib, dinov2, open_clip_local
3de7bf6
"""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)