Index: lib/compiler/implementation/lib/js_helper.dart |
=================================================================== |
--- lib/compiler/implementation/lib/js_helper.dart (revision 11193) |
+++ lib/compiler/implementation/lib/js_helper.dart (working copy) |
@@ -815,9 +815,12 @@ |
message.endsWith('is undefined') || |
message.endsWith('is null or undefined')) { |
return new NullPointerException(); |
- } else if (message.contains(' is not a function')) { |
+ } else if (message.contains(' is not a function') || |
+ message.contains("doesn't support property or method")) { |
+ // Examples: |
// x.foo is not a function |
// 'undefined' is not a function (evaluating 'x.foo(1,2,3)') |
+ // Object doesn't support property or method 'foo' |
// TODO(kasperl): Compute the right name if possible. |
return new NoSuchMethodException('', '<unknown>', []); |
} |