Additional exception handling
This commit is contained in:
parent
2475241f21
commit
79c099cdf1
@ -288,8 +288,14 @@ class YandereBot:
|
||||
# The post was successful
|
||||
return picked
|
||||
|
||||
# Invalid post (move to next profile)
|
||||
except InvalidPost as e:
|
||||
print("Invalid post:", e)
|
||||
|
||||
# Failed post
|
||||
except (BannedTag, UnknownMimeType, InvalidMimeType, FileNotFoundError) as e:
|
||||
# Decrement currentIndexCount to repost from the same profile
|
||||
self.currentIndexCount -= 1
|
||||
print("Posting error:", e)
|
||||
|
||||
# Check if the file limit has been reached
|
||||
|
Reference in New Issue
Block a user