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

Exception derived class created #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Exception derived class created #10

wants to merge 2 commits into from

Conversation

iamAravindks
Copy link

i'm trying to create custom error.

@iamAravindks
Copy link
Author

help me to create the custom error :D

Copy link
Contributor

@twentyse7en twentyse7en left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of the issue. I have added a few comments. Hope this helps. Feel free to contact if you have any doubt.

@@ -0,0 +1,60 @@
# Default ignored files
/shelf/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What code editor do you use? I think we can create minimal .gitignore.

@@ -2,6 +2,7 @@
from token_type import TokenType



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid adding extra space and removing space, you can use autopep8 or similar extension in the code editor.


# raise Error
#FIX THIS ERROR
class Error(Exception):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move the Error class outside the Scanner class. It would be better to rename the error, the error name which relates to scanner would be good. Do we need def __init__(...)? I think inheriting the Exception takes care of that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestions @twentyse7en :D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants