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

Raises an error if styleguide section comment misses section definition #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tow8ie
Copy link

@tow8ie tow8ie commented Jan 30, 2015

Prior to this patch, if one tried to access a section (name) of a parsed KSS section comment that misses the section name definition, a NoMethodError: undefined method []' for nil:NilClass` was thrown because the code assumed the Regex for finding the section name always succeeded.

To handle this error of a missing or wrongly formatted section name catching the very generic NoMethodError is not specific enough. I therefore introduced a SectionNotDefinedError that can be catched instead.

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.

1 participant