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

Unified Diff: dart/lib/compiler/implementation/tree/nodes.dart

Issue 11308006: Throw an exception when invariant fails and report nice diagnostic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « dart/lib/compiler/implementation/ssa/codegen.dart ('k') | dart/lib/compiler/implementation/util/util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/tree/nodes.dart
diff --git a/dart/lib/compiler/implementation/tree/nodes.dart b/dart/lib/compiler/implementation/tree/nodes.dart
index 3c261ec29d294c8a07ebc72dea3ff820db3425b4..0d593a1c87762571f040596127c33ee826d2f987 100644
--- a/dart/lib/compiler/implementation/tree/nodes.dart
+++ b/dart/lib/compiler/implementation/tree/nodes.dart
@@ -93,12 +93,6 @@ Token firstBeginToken(Node first, Node second) {
return token;
}
-class NodeAssertionFailure implements Exception {
- final Node node;
- final String message;
- NodeAssertionFailure(this.node, this.message);
-}
-
/**
* A node in a syntax tree.
*
@@ -1304,8 +1298,8 @@ class StringJuxtaposition extends StringNode {
*/
DartString get dartString {
if (isInterpolation) {
- throw new NodeAssertionFailure(this,
- "Getting dartString on interpolation;");
+ throw new SpannableAssertionFailure(
+ this, "Getting dartString on interpolation;");
}
if (dartStringCache == null) {
DartString firstString = first.accept(const GetDartStringVisitor());
« no previous file with comments | « dart/lib/compiler/implementation/ssa/codegen.dart ('k') | dart/lib/compiler/implementation/util/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698