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

Reference errors #316

Closed
bartmichu opened this issue Apr 9, 2014 · 4 comments
Closed

Reference errors #316

bartmichu opened this issue Apr 9, 2014 · 4 comments

Comments

@bartmichu
Copy link
Contributor

First of all I don't know if it's a bug or a feature, maybe that's how Espruino is supposed to work, but I couldn't find any reference.

When trying to use variables that are not defined, Espruino is happy to accept them instead of throwing a ReferenceError:

var x = foo;
=undefined
function f() {return arguments.length;}
f(blahblah);
=1
@gfwilliams
Copy link
Member

Yes, it's intentional as there's no nice way to handle errors. Hopefully when exceptions are added I could add the reference errors though.

@gfwilliams
Copy link
Member

@gfwilliams
Copy link
Member

Post on it asking for opinions here: http://forum.espruino.com/conversations/272650/#comment12448624

@gfwilliams
Copy link
Member

Merged into master now. Branch deleted.

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

No branches or pull requests

2 participants