k-pet-group / Strype

A frame-based editor for Python which runs in the browser
GNU Affero General Public License v3.0
0 stars 7 forks source link

Turtle program continues running if listening, even if code has hit an error #280

Closed neilccbrown closed 1 week ago

neilccbrown commented 3 months ago

This is an awkward one; I'm not 100% sure if this is a bug or just expected behaviour. Pierre said he thinks it is a bug. Essentially, run some turtle code that sets up key listeners; this would usually correctly keep the program alive. But then run something beneath that which causes an error. As a user I expected the program to exit because of the uncaught error, but instead it stays alive (presumably, listening for key events on the turtle). I was confused why I couldn't then edit the code. So maybe we should force an exit on uncaught error, even if it wouldn't otherwise exit?

image

neilccbrown commented 3 months ago

This is definitely a bug: a knock-on effect is that when you click the Stop button to stop execution, and we throw a special error to kill execution.... it doesn't stop, so the program cannot be manually stopped while we listen for events.

neilccbrown commented 3 months ago

In GitLab by @PwtKCL on Aug 8, 2024, 18:39

mentioned in commit df15b60e78acb90ef1d1891bbeddddd63df5238a