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
|
*.apk
|
||||||
*.jar
|
*.jar
|
||||||
*.keystore
|
*.keystore
|
||||||
venv
|
*venv
|
||||||
*/__pycache__*
|
*/__pycache__*
|
||||||
*.pyc
|
*.pyc
|
||||||
/revanced-cache/
|
/revanced-cache/
|
||||||
|
|||||||
+2
-1
@@ -152,7 +152,8 @@ class APP(object):
|
|||||||
try:
|
try:
|
||||||
self.resource[resource_name] = future.result()
|
self.resource[resource_name] = future.result()
|
||||||
except BuilderError as e:
|
except BuilderError as e:
|
||||||
raise PatchingFailedError(e) from e
|
msg = "Failed to download resource."
|
||||||
|
raise PatchingFailedError(msg) from e
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generate_filename(url: str) -> str:
|
def generate_filename(url: str) -> str:
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ class BuilderError(Exception):
|
|||||||
|
|
||||||
message = "Default Error message."
|
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:
|
def __str__(self: Self) -> str:
|
||||||
"""Return error message."""
|
"""Return error message."""
|
||||||
return self.message
|
return self.message
|
||||||
|
|||||||
Reference in New Issue
Block a user