Goodbye “undefined is not a function”
plus.google.com
plus.google.com
Still, there are decent improvements we could make. Star, or better yet, comment on https://code.google.com/p/chromium/issues/detail?id=259443 with how you get caught out by weak error messages. We want the debugging cycle to be a lot more direct from error to fix.
[1] https://dxr.mozilla.org/mozilla-central/search?q=ExpressionD... [2] https://bugzilla.mozilla.org/show_bug.cgi?id=718969
Please also look into the "Script error" message. I know it is intentionally non-descript to prevent leaking information about cross domain requests but there has to be something that is safe to report that will help developers narrow down what is causing it.
For those of you who argue that the US standard of living hasn't improved since the 70s: How do you defend your position in the face of this overwhelming counter-evidence?
foo.bar().fiz().buz()
What's undefined, bar, fiz, or buz? Then you have to set a breakpoint to find out. Most people I know try to avoid writing code like this, but Knockout ViewModels are a common place where this bites me. foo = {}
foo.bar()
Or, more commonly, foo = {};
bar = 'bar';
foo[bar]();More specifically, I have yet to write Elm code that compiles and throws a runtime exception. I sure don't miss seeing "undefined is not a function!"
A top-shelf compiler is a hell of a drug. :)
In general, Elm's replacement for the concept of undefined is Maybe, and the compiler will tell you if you forgot to handle something properly:
It would be trivial to tell me what the name of the nil variable was - in this case it's obvious, but it's often not.
I wonder how large js apps handle production debugging and error reporting on all browsers? The last time I tried window.onerror it had decent support but not comprehensive support across browsers. Maybe its just me but this seems like a problem really needing to be solved, especially as js apps get bigger and bigger.
Another one (which IE may have stopped doing in recent versions) is the annoying translation of exceptions.
O servidor Automation não consegue criar o objeto -- anyone? :)As someone who might have to do some startup marketting - what did I do wrong from a copyrighting point of view?
Here is the post https://news.ycombinator.com/item?id=9087763
I have no idea how many other people might have read your submission on their phone and had the same issue though.
I'm a bit cynical, but I definitely think that had something to do with it if it wasn't just for the timing.
Deleted comment
(in firefox :^)
TypeError: foo.bar is not a function(for completeness, in Safari)
Internet Explorer has stopped working
Windows is checking for a solution to the problem...
[||||||||||||||||||||||||||||||||||||||||||||||||||]
[ Cancel ]chrome canary