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

Side by Side Diff: pkg/source_span/lib/src/span_exception.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/source_maps/pubspec.yaml ('k') | sdk/lib/core/exceptions.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library source_span.span_exception; 5 library source_span.span_exception;
6 6
7 import 'span.dart'; 7 import 'span.dart';
8 8
9 /// A class for exceptions that have source span information attached. 9 /// A class for exceptions that have source span information attached.
10 class SourceSpanException implements Exception { 10 class SourceSpanException implements Exception {
(...skipping 18 matching lines...) Expand all
29 if (span == null) return message; 29 if (span == null) return message;
30 return "Error on " + span.message(message, color: color); 30 return "Error on " + span.message(message, color: color);
31 } 31 }
32 } 32 }
33 33
34 /// A [SourceSpanException] that's also a [FormatException]. 34 /// A [SourceSpanException] that's also a [FormatException].
35 class SourceSpanFormatException extends SourceSpanException 35 class SourceSpanFormatException extends SourceSpanException
36 implements FormatException { 36 implements FormatException {
37 final source; 37 final source;
38 38
39 int get position => span == null ? null : span.start.offset; 39 int get offset => span == null ? null : span.start.offset;
40 40
41 SourceSpanFormatException(String message, SourceSpan span, [this.source]) 41 SourceSpanFormatException(String message, SourceSpan span, [this.source])
42 : super(message, span); 42 : super(message, span);
43 } 43 }
OLDNEW
« no previous file with comments | « pkg/source_maps/pubspec.yaml ('k') | sdk/lib/core/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698