Skip to content

Commit

Permalink
Add custom exception 'WebsiteVersionNotSupported'
Browse files Browse the repository at this point in the history
  • Loading branch information
Crinibus committed Nov 14, 2023
1 parent ac9ca8a commit aec710c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scraper/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ def __str__(self) -> str:
return f"Website '{self.website_name}' is currently not supported"


class WebsiteVersionNotSupported(Exception):
def __init__(self, website_name: str, *args: object) -> None:
super().__init__(*args)
self.website_name = website_name

def __str__(self) -> str:
return f"Website version '{self.website_name}' is currently not supported"


class URLMissingSchema(Exception):
def __init__(self, url, *args: object) -> None:
super().__init__(*args)
Expand Down

0 comments on commit aec710c

Please sign in to comment.