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

Unified Diff: pkg/source_maps/lib/span.dart

Issue 396603003: Change "FormatException.position" to be named "offset". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Include changes to SpanFormatException Created 6 years, 5 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
Index: pkg/source_maps/lib/span.dart
diff --git a/pkg/source_maps/lib/span.dart b/pkg/source_maps/lib/span.dart
index 771e9e0efa2804c58d93de49353902362d09fadc..7b513e6be97ffdc66d53de51bfb97fd06b6571bb 100644
--- a/pkg/source_maps/lib/span.dart
+++ b/pkg/source_maps/lib/span.dart
@@ -385,9 +385,10 @@ class SpanException implements Exception {
/// A [SpanException] that's also a [FormatException].
class SpanFormatException extends SpanException implements FormatException {
- SpanFormatException(String message, Span span)
+ final source;
+
+ SpanFormatException(String message, Span span, [this.source])
: super(message, span);
- get source => null;
- int get position => null;
+ int get position => span == null ? null : span.start.offset;
}

Powered by Google App Engine
This is Rietveld 408576698