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

Syntax error programs throw unhandled exceptions #21

Closed
dabbler0 opened this issue Nov 4, 2014 · 2 comments
Closed

Syntax error programs throw unhandled exceptions #21

dabbler0 opened this issue Nov 4, 2014 · 2 comments

Comments

@dabbler0
Copy link
Member

dabbler0 commented Nov 4, 2014

The reparse operation that happens every time we drop a block throws an unhandled error if the resulting combination is a syntax error. Example:

1 + 1;
function hello(a) {
  return a;
}

Drag the 1+1 block to make:

function hello(1 + 1) {
  return a;
}

In this case the drop appears not to "complete"; the 1+1 block will continue to be dragged until another mouse event. This is because the process that cleans up the end of the drag has thrown an error while trying to reparse the function block and had not recovered.

Ideally, in this situation, Droplet would undo the drop or forbid the drop to begin with.

@dabbler0 dabbler0 changed the title Blocks that form syntax errors -> unhandled exception Syntax error blocks throw unhandled exceptions Nov 4, 2014
@dabbler0 dabbler0 changed the title Syntax error blocks throw unhandled exceptions Syntax error programs throw unhandled exceptions Nov 4, 2014
@sehgalvibhor
Copy link

Hi,

I want to work on this issue. Has it been already fixed or not? Whenever i try the program example you mentioned above, the (1+1) block up ends like this
function(a){
return '1+1';
}

The block automatically goes in the return statement of the function. Does that need to be fixed?
Thanks.

@dabbler0
Copy link
Member Author

Hi @sehgalvibhor,

Yep, this issue has was fixed in PR #64. We'd still love to have you work on an issue, though, if you like -- #93 (an Internet Explorer compatability issue) is still open, as well as #56 (a rendering issue)!

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

No branches or pull requests

2 participants