-
Notifications
You must be signed in to change notification settings - Fork 0
Exceptions
Ankit_Anmol edited this page Dec 1, 2021
·
6 revisions
You can find the full list of exceptions here.
To catch an exception:
from ScraGet import ScraGet, Exceptions #Importing the exceptions
user = ScraGet.get_user()
try: #to handle error
user.updateScratch("Hello world! Hello? Hi.... anyone?") #this user doesn't exist. So this should throw an error
except Exceptions.UserNotFound:
print("OH.. this user doesn't exist!!")
You can do the same with other exceptions. Just replace the <the exception>
in Exceptions.<the exception>
to catch a different error.
Did you get an error caused internally by ScraGet but didn't get an error from exceptions list? Make an issue!
Any API you know not covered by this library? Any mistake in this wiki? Create an issue!
Have questions? Ask in the Q/A section!