-
Notifications
You must be signed in to change notification settings - Fork 64
Raise error that can be handled by try/except #45
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
base: master
Are you sure you want to change the base?
Conversation
|
There are also errors being printed in line 63,94,111 of core.py. @rhijjawi can you please add changes so that we raise error in them as well. |
|
Done 👍 |
|
I don't think |
|
The git owner @geekpradd set that part up. I could push a fix that would work around that. Keep in mind that that solution raise works well in case you don't know what error is going to be thrown. |
|
Was about to submit a PR with the exact same code verbatim. Would be awesome if this gets added because right now I'm hashing the error message to check whether a word is invalid |
| except Exception as e: | ||
| if disable_errors == False: | ||
| print("Error: The Following Error occured: %s" % e) | ||
| raise e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what type of exceptions would get raised here? is it possible to raise other named exceptions in this block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I just saw this, I haven't been on GitHub in a while. Depends on the error in the Exception. If anyone knows the complete list of errors thrown by this exception, go ahead and list them here.
Issue #34 refers to the fact that when a word is not found, the console prints an error that cannot be captured. This PR fixes this issue by raising an error that can be handled.