File tree 5 files changed +18
-3
lines changed
5 files changed +18
-3
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.2.9
2
+
3
+ * When ` FormatException ` is caught in "checked mode", use the ` message `
4
+ property when creating ` CheckedFromJsonException ` .
5
+
1
6
## 0.2.8
2
7
3
8
* Added ` $checkKeys ` helper function and deprecated ` $checkAllowedKeys ` .
Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ class CheckedFromJsonException implements Exception {
96
96
return error.message? .toString ();
97
97
} else if (error is BadKeyException ) {
98
98
return error.message;
99
+ } else if (error is FormatException ) {
100
+ var message = error.message;
101
+ if (error.offset != null ) {
102
+ message = '$message at offset ${error .offset }.' ;
103
+ }
104
+ return message;
99
105
}
100
106
return null ;
101
107
}
Original file line number Diff line number Diff line change 1
1
name : json_annotation
2
- version : 0.2.8
2
+ version : 0.2.9-dev
3
3
description : >-
4
4
Classes and helper functions that support JSON code generation via the
5
5
`json_serializable` package.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ dependencies:
13
13
14
14
# Use a tight version constraint to ensure that a constraint on
15
15
# `json_annotation`. Properly constrains all features it provides.
16
- json_annotation : ' >=0.2.8 <0.2.9 '
16
+ json_annotation : ' >=0.2.9 <0.2.10 '
17
17
meta : ^1.1.0
18
18
path : ^1.3.2
19
19
source_gen : ^0.8.2
@@ -27,3 +27,7 @@ dev_dependencies:
27
27
logging : ^0.11.3+1
28
28
test : ^1.0.0
29
29
yaml : ^2.1.13
30
+
31
+ dependency_overrides :
32
+ json_annotation :
33
+ path : ../json_annotation
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ builders:
140
140
builder_name:
141
141
builder_factories: ["scssBuilder"]
142
142
configLocation: "user@host:invalid/uri"''' :
143
- '''line 4, column 21 of file.yaml: Could not create `Builder`. Unsupported value for `configLocation`.
143
+ '''line 4, column 21 of file.yaml: Could not create `Builder`. Unsupported value for `configLocation`. Illegal scheme character at offset 4.
144
144
configLocation: "user@host:invalid/uri"
145
145
^^^^^^^^^^^^^^^^^^^^^^^'''
146
146
};
You can’t perform that action at this time.
0 commit comments