docs for the exceptions

so that it's easier to make wrappers

i think the rest is self explanatory (famous last words)
This commit is contained in:
TheTechRobo 2021-05-27 16:38:01 -04:00 committed by GitHub
parent dbe0c3dd86
commit 4e9142aebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

10
URLs.py
View File

@ -1,9 +1,15 @@
import subprocess, json, random, sys
class DownloadError(RuntimeError):
pass
"""
Provides the output from Popen.communicate(), the entire tuple, each byte as a bytes string along with the exception (you will probably need to decode it with .decode("utf-8")).
To access it, use something like "except URLs.DownloadError as output:" and then it will be saved as variable output
"""
class NonexistentUrl(BaseException):
pass
"""
Provides the URL that was tried along with the exception.
To access it, use something like "except URLs.NonexistentUrl as url:" and then it will be saved as variable url
"""
class URL:
def __init__(self):
self.GetConfig()