Line data Source code
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
3 : // BSD-style license that can be found in the LICENSE file.
4 :
5 : import 'package:source_span/source_span.dart';
6 :
7 : /// An exception thrown by a [StringScanner] that failed to parse a string.
8 : class StringScannerException extends SourceSpanFormatException {
9 0 : String get source => super.source;
10 :
11 : /// The URL of the source file being parsed.
12 : ///
13 : /// This may be `null`, indicating that the source URL is unknown.
14 0 : Uri get sourceUrl => span.sourceUrl;
15 :
16 : StringScannerException(String message, SourceSpan span, String source)
17 0 : : super(message, span, source);
18 : }
|