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

Faulty code: CodeError are resumable #13037

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

privat
Copy link
Contributor

@privat privat commented Mar 17, 2023

This PR feels like nothing, but is an achievement based on numerous previous PR on cleaning, improvements and bugfixes.

It shows that error management in compilation starts to become consistent.

It also means that when a debugger windows pop up in syntax or semantic error, user can "resume" and a faulty method might be produced.

e.g. try the following in the playground

Smalltalk compiler evaluate: '1+'

You will get a syntax error. Then click on "▶️ proceed", and the code will be executed anyway (you proceeded, it's your fault) and thus you will a runtime error (whatever as hard you try, a thing is missing, and no decent value can be produced).

Note: I expect that some things might break, although faulty AST and faulty CompiledMethods are tested a lot, but I likely missed some code paths or usage (especially in GUI)

@privat
Copy link
Contributor Author

privat commented Mar 17, 2023

Note: @MarcusDenker this might help you to import bad or old code :)

@MarcusDenker
Copy link
Member

Nice!

@MarcusDenker MarcusDenker merged commit 1f6de74 into pharo-project:Pharo12 Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants