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

Added an exception when bundle name is not valid #71

Merged
merged 4 commits into from Aug 13, 2016
Merged

Added an exception when bundle name is not valid #71

merged 4 commits into from Aug 13, 2016

Conversation

aouaki
Copy link
Contributor

@aouaki aouaki commented Aug 13, 2016

This commit adds an error message when the bundle name could not be resolved.

Addresses issue #67

@coveralls
Copy link

coveralls commented Aug 13, 2016

Coverage Status

Coverage increased (+0.06%) to 97.945% when pulling 757741c on aouaki:master into 8ba71d0 on owais:master.

try:
bundle_chunks = chunks[bundle_name]
except KeyError:
raise WebpackError('Cannot resolve bundle {}.'.format(bundle_name))
Copy link
Collaborator

Choose a reason for hiding this comment

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

WebpackError is used to represent errors that were raised by webpack itself. This should use a new exception and how about,

chunks = assets['chunks'].get(bundle_name, None)
if chunks is None:
     raise WebpackBundleLookupError("...")

@coveralls
Copy link

coveralls commented Aug 13, 2016

Coverage Status

Coverage increased (+0.06%) to 97.945% when pulling dbdcf19 on aouaki:master into 8ba71d0 on owais:master.

@coveralls
Copy link

coveralls commented Aug 13, 2016

Coverage Status

Coverage increased (+0.06%) to 97.945% when pulling 5c1686c on aouaki:master into 8ba71d0 on owais:master.

@coveralls
Copy link

coveralls commented Aug 13, 2016

Coverage Status

Coverage increased (+0.06%) to 97.945% when pulling 5c29e70 on aouaki:master into 8ba71d0 on owais:master.

@owais owais merged commit 926f582 into django-webpack:master Aug 13, 2016
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.

None yet

3 participants