Skip to content

Commit 8b54e8d

Browse files
authored
Don't obscure exceptions occuring during inlining in macroexpansion (#1014)
Fixes #1013
1 parent 2116945 commit 8b54e8d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
* Exceptions occurring during inlining during macroexpansion are no longer obscured by the outer macroexpansion exception (#1013)
810

911
## [v0.2.0]
1012
### Added

src/basilisp/lang/compiler/analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,7 @@ def _invoke_ast(form: Union[llist.PersistentList, ISeq], ctx: AnalyzerContext) -
26392639
return __handle_macroexpanded_ast(form, expanded, ctx)
26402640
except Exception as e:
26412641
if isinstance(e, CompilerException) and ( # pylint: disable=no-member
2642-
e.phase == CompilerPhase.MACROEXPANSION
2642+
e.phase in {CompilerPhase.MACROEXPANSION, CompilerPhase.INLINING}
26432643
):
26442644
# Do not chain macroexpansion exceptions since they don't
26452645
# actually add anything of value over the cause exception

0 commit comments

Comments
 (0)