Skip to content

Ctrl-C during scroll continues to subsequent raised exception #134

Closed
@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

Run this script:

from microbit import *

display.scroll('Takes a while')
raise ValueError(123)

Press Ctrl-C during the scrolling text.

Unexpectedly you see the error message from the ValueError scrolled on the micro:bit.

If the raise line is replaced with print("Here") then the print output doesn't show.
If the scroll is replaced by a sleep then the ValueError does not show.

This behaviour is a bit awkward for the simulator as our stop button sends a Ctrl-C to interrupt the program, but given this behaviour it can be 10s of seconds before it actually stops.

The original code example was more realistic with the ValueError thrown by micro:bit MicroPython API parameter validation.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions