pharo icon indicating copy to clipboard operation
pharo copied to clipboard

evaluate: aString andDo: aBlock should better handle buggy expressions.

Open Ducasse opened this issue 6 years ago • 2 comments

For example if I type menuOn: do it it would be good to have something else that a crappy feedback variable or expression expected -> ....

We should get an error that we can then decide what to do.

Ducasse avatar Oct 27 '19 08:10 Ducasse

I do not understand how todo it better: "do it" means : execute this selected code. The parser might not be able to parse it, so it shows that parse error. There is no better error that can be shown, as this is what the error is.

MarcusDenker avatar Feb 08 '23 11:02 MarcusDenker

We should remove the -> logic modifying the original code is a cheap and dated way to report error. We should raise an error and let the client decide what to do.

Ducasse avatar Jul 30 '24 07:07 Ducasse