mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
👷 Updated error handling (#348)
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
*.apk
|
||||
*.jar
|
||||
*.keystore
|
||||
venv
|
||||
*venv
|
||||
*/__pycache__*
|
||||
*.pyc
|
||||
/revanced-cache/
|
||||
|
||||
+2
-1
@@ -152,7 +152,8 @@ class APP(object):
|
||||
try:
|
||||
self.resource[resource_name] = future.result()
|
||||
except BuilderError as e:
|
||||
raise PatchingFailedError(e) from e
|
||||
msg = "Failed to download resource."
|
||||
raise PatchingFailedError(msg) from e
|
||||
|
||||
@staticmethod
|
||||
def generate_filename(url: str) -> str:
|
||||
|
||||
@@ -7,6 +7,11 @@ class BuilderError(Exception):
|
||||
|
||||
message = "Default Error message."
|
||||
|
||||
def __init__(self: Self, *args: Any, **kwargs: Any) -> None:
|
||||
if args:
|
||||
self.message = args[0]
|
||||
super().__init__(self.message)
|
||||
|
||||
def __str__(self: Self) -> str:
|
||||
"""Return error message."""
|
||||
return self.message
|
||||
|
||||
Reference in New Issue
Block a user