Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling #18

Merged
merged 25 commits into from
Jun 30, 2023
Merged

Error handling #18

merged 25 commits into from
Jun 30, 2023

Conversation

TheXer
Copy link
Owner

@TheXer TheXer commented Jun 16, 2023

Popis:

Spravení error handlingu z

if error_handling(answers):
            return await message.edit(embed=PollEmbedBase(error_handling(answers)))

na

if len(answer) > Poll.MAX_OPTIONS:
        raise TooManyOptionsError(f"Zadal jsi příliš mnoho odpovědí, můžeš maximálně {Poll.MAX_OPTIONS}!")

Proč?

Zvýšení čtitelnosti, jednodušší práce s error handlingem a přehlednost.

Co dodělat?

TheXer and others added 10 commits June 5, 2023 22:47
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
Signed-off-by: robertsokola <robertsokola2@gmail.com>
@TheXer TheXer added the enhancement New feature or request label Jun 16, 2023
@TheXer TheXer self-assigned this Jun 16, 2023
@TheXer TheXer linked an issue Jun 16, 2023 that may be closed by this pull request
@TheXer
Copy link
Owner Author

TheXer commented Jun 19, 2023

Zmáknuto, nyní vymyslet nějaký pěkný embed pro vypsání errorů, případně s obrázkem. @Martian-0007 chceš to zkusit udělat?

Signed-off-by: robertsokola <robertsokola2@gmail.com>
@TheXer
Copy link
Owner Author

TheXer commented Jun 29, 2023

Doděláno.

@TheXer TheXer changed the base branch from master to jachym_2.0 June 29, 2023 21:14
@TheXer TheXer merged commit d999fa1 into jachym_2.0 Jun 30, 2023
1 check passed
@TheXer TheXer deleted the dev-branch branch June 30, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Spravit error handling ve projektu
2 participants