Skip to content

Conversation

@aaugustin
Copy link
Contributor

Per https://docs.python.org/3/library/exceptions.html:

programmers are encouraged to derive new exceptions from the Exception
class or one of its subclasses, and not from BaseException.

Specifically deriving from BaseException prevents Jinja2 from handling
errors and Django from displaying the debug page when the webpack build
fails, because Jinja2 catches Exception (this is the logical behavior):
https://github.com/mitsuhiko/jinja2/blob/5b498453b5898257b2287f14ef6c363799f1405a/jinja2/environment.py#L1009

Per https://docs.python.org/3/library/exceptions.html: > programmers are encouraged to derive new exceptions from the Exception > class or one of its subclasses, and not from BaseException. Specifically deriving from BaseException prevents Jinja2 from handling errors and Django from displaying the debug page when the webpack build fails, because Jinja2 catches Exception (this is the logical behavior): https://github.com/mitsuhiko/jinja2/blob/5b498453b5898257b2287f14ef6c363799f1405a/jinja2/environment.py#L1009
owais added a commit that referenced this pull request Jan 24, 2016
Derive exceptions from Exception.
@owais owais merged commit b00bf80 into django-webpack:master Jan 24, 2016
@owais
Copy link
Collaborator

owais commented Jan 24, 2016

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants