From bac43d4ce7cc9b265e5acb2a74bf5da2f7d82d18 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Fri, 12 Apr 2024 17:31:53 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20Add=20url=20to=20print=20stateme?= =?UTF-8?q?nt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/exceptions.py b/src/exceptions.py index 0c64b12..aebf5d1 100644 --- a/src/exceptions.py +++ b/src/exceptions.py @@ -33,6 +33,11 @@ class ScrapingError(BuilderError): super().__init__(*args) self.url = kwargs.get("url", None) + def __str__(self: Self) -> str: + """Exception message.""" + base_message = super().__str__() + return f"Message - {base_message} Url - {self.url}" + class APKMirrorIconScrapError(ScrapingError): """Exception raised when the icon cannot be scraped from apkmirror."""