You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve syntax error reporting by adding file context
When syntax errors occur during file loading, the error messages now
include the source file name through call_with_error_context/2 as
recommended in issue #302.
Before:
error(syntax_error(incomplete_reduction),read_term/3:8).
After:
error(syntax_error(incomplete_reduction),[file-'test_file.pl'|read_term/3:8]).
This approach uses the existing call_with_error_context/2 mechanism
instead of modifying the core error struct, following the established
pattern for enhancing error context in Scryer Prolog.
Changes:
- Modified stream_next_term/4 in src/loader.pl to wrap read_term/3
calls with call_with_error_context/2, providing file context when
available
Resolves: #302
Related: #3133
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments