"""Contains the custom Exceptions for the different errors that may occur""" class NoResultFoundException(Exception): """Raised when requesting data from the API and either the response code is 404 or the dataset is empty""" def __init__(self, message: str = ""): self.message = message print("===========================") print("RESULTS NOT FOUND IN YOUR SEARCH") print("===========================") Exception.__init__(self, str(self.message)) class WrongOptionChosen(Exception): """Raised when the parameter passed to the function is not one of the possible options to choose""" def __init__(self, message: str = ""): self.message = message print("===========================") print("YOU ENTERED A WRONG OPTION, CHECK BELOW THE POSSIBLE OPTIONS TO INPUT:") print("===========================") Exception.__init__(self, str(self.message))