Commit a61255c
committed
Derive exceptions from Exception.
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#L10091 parent b91c62b commit a61255c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments