better error message

pull/1479/head
electro199 2 years ago
parent 64c8118379
commit 6af57bfd1d

@ -42,7 +42,7 @@ print_markdown(
checkversion(__VERSION__) checkversion(__VERSION__)
def main(POST_ID=None): def main(POST_ID=None) -> None:
global redditid ,reddit_object global redditid ,reddit_object
reddit_object = get_subreddit_threads(POST_ID) reddit_object = get_subreddit_threads(POST_ID)
redditid = id(reddit_object) redditid = id(reddit_object)
@ -55,7 +55,7 @@ def main(POST_ID=None):
make_final_video(number_of_comments, length, reddit_object, bg_config) make_final_video(number_of_comments, length, reddit_object, bg_config)
def run_many(times): def run_many(times) -> None:
for x in range(1, times + 1): for x in range(1, times + 1):
print_step( print_step(
f'on the {x}{("th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th")[x % 10]} iteration of {times}' f'on the {x}{("th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th")[x % 10]} iteration of {times}'
@ -108,10 +108,9 @@ if __name__ == "__main__":
shutdown() shutdown()
except Exception as err: except Exception as err:
print_step(f''' print_step(f'Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the Discord community.\n'
Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the Discord community.\n f'Version: {__VERSION__},Story mode: {str(config["settings"]["storymode"])}, Story mode method: {str(config["settings"]["storymodemethod"])},\n'
Version: {__VERSION__},Story mode: {str(config["settings"]["storymode"])}, Story mode method: {str(config["settings"]["storymodemethod"])}, f'Postid : {str(config["settings"])},allownsfw :{config["settings"]["allow_nsfw"]},is_nsfw : {str(reddit_object["is_nsfw"])}'
Postid : {str(config["settings"])},allownsfw :{config["settings"]["allow_nsfw"]},is_nsfw : {reddit_object["is_nsfw"]} )
''')
raise err raise err
# todo error # todo error

Loading…
Cancel
Save