Closed shriram closed 4 years ago
Yeah, that's a bad error report, and users shouldn't see that graph message, that's internal state leaking. This should be a fancy rendering, and just say “Failed while updating a ref field at ... because: ...”.
Working on it; I think the right thing to do here is just change how the ref-init
error renders.
Fixed by https://github.com/brownplt/pyret-lang/commit/73b1fe6d5e5b1ac3f0db597b4bdcd10d873a694b
I got confused by the initial error, though, because I thought the stateful warning outline was highlighting the value that violated the Option
check, rather than the whole value:
(That outlining is on horizon but not master)
This program has a bug: the line
ought to be
But the error is reported weirdly:
This has elements of the right stuff ("expected to get
Option
") but the rest of it looks like an internal error, especially the "Failed while initializing a graph", which I'm not sure is an error users should ever see (?).