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

Remove English locale dependency for detecting some JS errors #4703

Closed
efortuna opened this issue Aug 24, 2012 · 6 comments
Closed

Remove English locale dependency for detecting some JS errors #4703

efortuna opened this issue Aug 24, 2012 · 6 comments
Assignees
Labels
closed-duplicate Closed in favor of an existing report P0 A serious issue requiring immediate resolution web-dart2js
Milestone

Comments

@efortuna
Copy link
Contributor

Right now in Dart2js we rely on several English JavaScript error messages to detect failure conditions for Dart compiled to JS. (Examples include "is null or undefined", " is not a function'", and "doesn't support property or method" (lines 807-810 in r11307). This will be a problem for users whose JS errors are printed in a language other than English. We need to come up with alternative error handling for errors in different languages.

Code mentioned: http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/lib/compiler/implementation/lib/js_helper.dart

Suggestion: In lines 809-810, we know the error is a type error, can we know it's not a NullPointerException or a ObjectNotClosureException. Can we just always throw a NoSuchMethodException in that case instead of also testing if (message.contains(' is not a function') || message.contains("doesn't support property or method")) ?

@efortuna
Copy link
Contributor Author

Changed the title to: "Remove English locale dependency for detecting some JS errors".

@efortuna
Copy link
Contributor Author

@peter-ahe-google
Copy link
Contributor

This is masking other bugs and too dangerous to leave in for any amount of time.


Set owner to @peter-ahe-google.
Removed this from the M3 milestone.
Added this to the M1 milestone.
Removed Priority-Medium label.
Added Priority-Critical, Triaged labels.

@efortuna
Copy link
Contributor Author

What bugs is it masking? All the status changes made as a result of the "broadening the NSME" CL, were all to IE tests that were failing because it wasn't correctly throwing a NoSuchMethodException.

@peter-ahe-google
Copy link
Contributor

I think we can get a locale-independent error code using:

http://msdn.microsoft.com/en-us/library/hc53e755(v=vs.94).aspx


Added Accepted label.

@peter-ahe-google
Copy link
Contributor

Added Duplicate label.
Marked as being merged into #3313.

@efortuna efortuna added Type-Defect P0 A serious issue requiring immediate resolution web-dart2js closed-duplicate Closed in favor of an existing report labels Aug 25, 2012
@efortuna efortuna added this to the M1 milestone Aug 25, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report P0 A serious issue requiring immediate resolution web-dart2js
Projects
None yet
Development

No branches or pull requests

2 participants