Skip to content

Commit 4273509

Browse files
authored
Improve nested symbol exception message (#459)
1 parent 6292e84 commit 4273509

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/basilisp/lang/compiler/analyzer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,7 +2291,12 @@ def __resolve_namespaced_symbol( # pylint: disable=too-many-branches
22912291
return resolved
22922292

22932293
if "." in form.ns:
2294-
return _resolve_nested_symbol(ctx, form)
2294+
try:
2295+
return _resolve_nested_symbol(ctx, form)
2296+
except CompilerException:
2297+
raise AnalyzerException(
2298+
f"unable to resolve symbol '{form}' in this context", form=form
2299+
) from None
22952300
elif ctx.should_allow_unresolved_symbols:
22962301
return _const_node(ctx, form)
22972302
else:

0 commit comments

Comments
 (0)