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

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: Reapply change, with necessary fixes in span_execption.dart 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
« no previous file with comments | « pkg/source_maps/CHANGELOG.md ('k') | pkg/source_maps/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b546a97aa0f2aa6d0515827688b70d86e5e86a0b 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 offset => span == null ? null : span.start.offset;
}
« no previous file with comments | « pkg/source_maps/CHANGELOG.md ('k') | pkg/source_maps/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698