Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 Revise runtime errors to include actual values #5308

Merged
merged 6 commits into from
Apr 1, 2024
Merged

Conversation

boryanagoncharenko
Copy link
Collaborator

Fixes #5005
Value errors display the actual value that is causing the error instead of the variable name holding this value.

How to test
Run Hedy locally and check whether the following programs produce correct error messages. Ensure that you supply text values to all ask commands and that the errors contain the actual value you supplied.
Level 1

turn around

Level 2

play -5
q is -5
play q
note is ask what note
play note
a is ask 'Input'
turn a
a is ask 'Input'
forward a
color is ask Color?
color color
a is ask Provide text here
sleep a

Level 6

a is ask Provide text here
sleep a
a is ask 'Provide text here'
print a * 1

Level 7

a is ask 'Provide text here'
repeat a times print 'Hello folks'

Level 12

a is ask 'Input'
turn a
a is ask 'Input'
forward a
a is ask 'Provide text here'
print a * 1

Copy link
Member

@Felienne Felienne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely improvement, thanks!

image

Copy link
Contributor

mergify bot commented Apr 1, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@Felienne
Copy link
Member

Felienne commented Apr 1, 2024

Owno, this has conflicts now because of the changed Pygame tests, and I am afraid to mess things up, can you take a look @boryanagoncharenko?

Copy link
Contributor

mergify bot commented Apr 1, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Apr 1, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 0fa6f9d into main Apr 1, 2024
12 checks passed
@mergify mergify bot deleted the play_5005 branch April 1, 2024 13:19
Copy link
Contributor

mergify bot commented Apr 1, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🪲 🎶 Use type validator for play
2 participants