Skip to content

Improve error messages, fix naming bug and assignment bug in native #362

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

Merged
merged 8 commits into from
Jan 18, 2020

Conversation

openorclose
Copy link
Contributor

@openorclose openorclose commented Oct 18, 2019

Fixes source-academy/frontend#963

When js functions throw their own errors (e.g. head(xs) will throw if xs is not a pair), it gets wrapped in an ExceptionError. If these functions are nested down, they each get wrapped in their own ExceptionError, causing the [object Object] error message.

Now, we check whether the error has already been wrapped before wrapping the error.

This also improves many of the Line -1 messages that occur.

This also fixes the bug here: https://sourceacademy.nus.edu.sg/playground#chap=3&exec=1000&ext=NONE&prgrm=GYVwdgxgLglg9mABAdwE4EMAOAKAlIgbwChFTEiBfIA

and the bug here:

https://sourceacademy.nus.edu.sg/playground#chap=3&exec=1000&ext=NONE&prgrm=DYUwLgBAhhC8EAcoEsBOBuAUDeS3qA

@coveralls
Copy link

coveralls commented Oct 18, 2019

Pull Request Test Coverage Report for Build 1792

  • 16 of 16 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 88.906%

Totals Coverage Status
Change from base Build 1770: 0.1%
Covered Lines: 2188
Relevant Lines: 2397

💛 - Coveralls

@chrisgzf
Copy link

chrisgzf commented Oct 20, 2019

can this be merged soon? many students are facing the [object Object] errors on piazza

EDIT: fixed

@openorclose openorclose changed the title Improve error messages Improve error messages and fix naming bug Oct 22, 2019
@openorclose openorclose changed the title Improve error messages and fix naming bug Improve error messages, fix naming bug and assignment bug in native Oct 25, 2019
@openorclose openorclose merged commit dc9b477 into master Jan 18, 2020
@openorclose openorclose deleted the improve-error-messages branch February 6, 2020 15:19
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.

Error Message: [object Object] if streams are not checked if they are null
4 participants