Skip to content

python: Include line number in state error#340

Merged
geonnave merged 1 commit intolake-rs:mainfrom
chrysn-pull-requests:where-is-the-python-error-from
Feb 3, 2025
Merged

python: Include line number in state error#340
geonnave merged 1 commit intolake-rs:mainfrom
chrysn-pull-requests:where-is-the-python-error-from

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Feb 3, 2025

StateMismatch errors can be quite hard to understand, this gives at least a pointer to where it comes from.


This is certainly not ideal: Ideally we'd describe in understandable terms on every location where a StateMismatch is created why that is, and/or have the Rust location as part of the Python object cause chain. The comment explains why we can't have the latter easily, and a longstanding comment on StateMismatch explains why the former is not easy.

Adding those line numbers is helpful to some, and currently the best we can do with the resources we have.

StateMismatch errors can be quite hard to understand, this gives at
least a pointer to where it comes from.
@geonnave geonnave merged commit 30fdd30 into lake-rs:main Feb 3, 2025
@chrysn chrysn deleted the where-is-the-python-error-from branch February 3, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants