Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: pkg/mdv/lib/src/element.dart

Issue 22340002: fix issue 12190 -- better error message (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mdv/lib/src/element.dart
diff --git a/pkg/mdv/lib/src/element.dart b/pkg/mdv/lib/src/element.dart
index a126161a71ca51b2ee4da7de005220001292a5cb..d1f62da358c03c0bff0bc6118020b2d625c0522f 100644
--- a/pkg/mdv/lib/src/element.dart
+++ b/pkg/mdv/lib/src/element.dart
@@ -13,6 +13,10 @@ class _ElementExtension extends _NodeExtension {
// (see "BindImperative" test in original JS code).
NodeBinding createBinding(String name, model, String path) =>
new _AttributeBinding(node, name, model, path);
+
+ // Normally we issue this error in Element._ensureTemplate, but we
+ // avoid calling that from the model getter, so issue the error here.
+ get model => throw new UnsupportedError('$node is not a template.');
}
class _AttributeBinding extends NodeBinding {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698