Open smcclellan opened 1 month ago
Adding more details.
Consider the following expression, that should throw an error: (let ((map 2)) (+ map map))
.
Such expressions cause the interpreter to throw an Unchecked(NameAlreadyUsed("map"))
while the compiler is handling this error as a GeneratorError::InternalError(…)
.
The compiler should reflect how the interpreter handles the error. Ideally working with these errors from stacks-core.
The generic GeneratorError::InternalError(…)
should really just be used for cases that we don't expect to show up.
@csgui @smcclellan I don’t understand this issue. Why does it exist, when #386 exists and was closed because we already have InternalError
s ?
@Acaccia I apologize that I closed issue #386 before an investigation into the need for an immediate work on compile-time errors. I should have reopened it instead. Let's consider this one for compilation-time error handling.
There are several places in the code where an
InternalError
is being thrown, wrapping anUnchecked
. This should use the proper underlying error to match the interpreter instead.