Skip to content

Commit 2d13371

Browse files
committed
Fix exception name
1 parent 6e5a6e4 commit 2d13371

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

example/lib/sealed_class_example.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

json_annotation/lib/src/allowed_keys_helpers.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class UnrecognizedKeysException extends BadKeyException {
7878

7979
/// Exception thrown if there is an unrecognized union type in a JSON map
8080
/// that was provided during deserialization.
81-
class UnrerecognizedUnionTypeException extends BadKeyException {
81+
class UnrecognizedUnionTypeException extends BadKeyException {
8282
/// The discriminator that was not recognized.
8383
final String unrecognizedType;
8484

@@ -89,8 +89,7 @@ class UnrerecognizedUnionTypeException extends BadKeyException {
8989
String get message => 'Unrecognized type: $unrecognizedType '
9090
'for union: $unionType.';
9191

92-
UnrerecognizedUnionTypeException(
93-
this.unrecognizedType, this.unionType, Map map)
92+
UnrecognizedUnionTypeException(this.unrecognizedType, this.unionType, Map map)
9493
: super._(map);
9594
}
9695

json_serializable/lib/src/decode_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ mixin DecodeHelper implements HelperCore {
179179
..writeAll(implementations.map(buildSingleImpl), '\n')
180180
..writeln(
181181
'''
182-
_ => throw UnrerecognizedUnionTypeException(
182+
_ => throw UnrecognizedUnionTypeException(
183183
'\${json['$discriminator']}',
184184
${element.name},
185185
json,

0 commit comments

Comments
 (0)