Spaces:
Sleeping
Sleeping
File size: 356 Bytes
1f725d8 5551822 1f725d8 5551822 1f725d8 5551822 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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] |