Multi-Rag / exception /__init__.py
VashuTheGreat2's picture
Upload folder using huggingface_hub
5551822 verified
import sys
import logging
class MyException(Exception):
def __init__(self, error_message: str, error_detail: sys = None):
super().__init__(error_message)
logging.exception(error_message)
def __str__(self) -> str:
"""
Returns the string representation of the error message.
"""
return self.args[0]