+ 5
you create custom exception by creating a class that inherits from the Exception class, it can be done with one line: class CustomException(Exception): pass you can now raise it whenever needed: raise CustomException('message') I hope this helps :)
27th Oct 2022, 5:42 PM
Apollo-Roboto
Apollo-Roboto - avatar