From 15be59be3158a7f253d5018fcd95aee97a4e0d44 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 25 Nov 2019 18:54:45 -0800 Subject: [PATCH] Make SassFormatException implement SourceSpanFormatException (#891) --- CHANGELOG.md | 7 ++++++- lib/src/exception.dart | 3 ++- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9a1c482..10566e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.23.8 +## 1.24.0 * **Potentially breaking bug fix:** Members loaded through a nested `@import` are no longer ever accessible outside that nested context. @@ -7,6 +7,11 @@ the same name. The latter name now takes precedence over the former, as per the specification. +### Dart API + +* `SassFormatException` now implements `SourceSpanFormatException` (and thus + `FormatException`). + ## 1.23.7 * No user-visible changes. diff --git a/lib/src/exception.dart b/lib/src/exception.dart index fea0d1b4..7b39494a 100644 --- a/lib/src/exception.dart +++ b/lib/src/exception.dart @@ -86,7 +86,8 @@ class SassRuntimeException extends SassException { } /// An exception thrown when Sass parsing has failed. -class SassFormatException extends SassException { +class SassFormatException extends SassException + implements SourceSpanFormatException { String get source => span.file.getText(0); int get offset => span.start.offset; diff --git a/pubspec.yaml b/pubspec.yaml index f12bc1cf..2dfa2894 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.23.8-dev +version: 1.24.0-dev description: A Sass implementation in Dart. author: Sass Team homepage: https://github.com/sass/dart-sass