Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better FieldError exception messages #10053

Closed
timotheecour opened this issue Dec 20, 2018 · 0 comments · Fixed by #11951
Closed

Better FieldError exception messages #10053

timotheecour opened this issue Dec 20, 2018 · 0 comments · Fixed by #11951

Comments

@timotheecour
Copy link
Member

timotheecour commented Dec 20, 2018

<insert summary here>

Example

<insert example here>

Current Output

`Error: unhandled exception: sons is not accessible [FieldError]`

Expected Output

Error: unhandled exception: sons is not accessible for `otherKind` [FieldError]

Possible Solution

Error: unhandled exception: sons is not accessible [FieldError] should show kind in error msg for an object variant

Additional Information

@krux02 krux02 changed the title Error: unhandled exception: sons is not accessible [FieldError] should show kind in error msg for an object variant <insert short and meaningful title here> Dec 21, 2018
@Araq Araq changed the title <insert short and meaningful title here> Better FieldError exception messages Dec 22, 2018
timotheecour added a commit to timotheecour/Nim that referenced this issue Aug 14, 2019
timotheecour added a commit to timotheecour/Nim that referenced this issue Aug 15, 2019
Araq pushed a commit that referenced this issue Aug 15, 2019
timotheecour added a commit to timotheecour/Nim that referenced this issue Aug 15, 2019
timotheecour added a commit to timotheecour/Nim that referenced this issue Aug 16, 2019
timotheecour added a commit to timotheecour/Nim that referenced this issue Aug 17, 2019
timotheecour added a commit to timotheecour/Nim that referenced this issue Nov 26, 2020
timotheecour added a commit to timotheecour/Nim that referenced this issue Aug 12, 2021
Araq pushed a commit that referenced this issue Aug 13, 2021
…+ lineinfo, in all backends (c,vm,js) (#11955)

* fix #10053 FieldError for vm

* fixup

* FieldError now also shows runtime value of discriminant

* fix field error reporting in vm

* also report culprit line info in err msg

* fix errors for newruntime 2

* fix for js

* fixup

* PRTEMP4

* works

* works

* works perfect

* refactor

* std/private/repr_impl

* suppport --gc:arc

* cleanup

* refactor

* simplify

* simplify

* simplify

* fixup

* move out compiler.vmgen.genCustom

* fixup

* fixup

* add tests

* revert compiler/debugutils.nim

* simplify reprDiscriminant

* fixup

* lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim

* try to fix D20210812T165220

* honor --declaredlocs

* control toFileLineCol via --declaredlocs
PMunch pushed a commit to PMunch/Nim that referenced this issue Mar 28, 2022
…t value + lineinfo, in all backends (c,vm,js) (nim-lang#11955)

* fix nim-lang#10053 FieldError for vm

* fixup

* FieldError now also shows runtime value of discriminant

* fix field error reporting in vm

* also report culprit line info in err msg

* fix errors for newruntime 2

* fix for js

* fixup

* PRTEMP4

* works

* works

* works perfect

* refactor

* std/private/repr_impl

* suppport --gc:arc

* cleanup

* refactor

* simplify

* simplify

* simplify

* fixup

* move out compiler.vmgen.genCustom

* fixup

* fixup

* add tests

* revert compiler/debugutils.nim

* simplify reprDiscriminant

* fixup

* lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim

* try to fix D20210812T165220

* honor --declaredlocs

* control toFileLineCol via --declaredlocs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant