Skip to content

Commit 6bf34e8

Browse files
kevmooO-Hannonen
authored andcommitted
Fix exception name
1 parent 1f12cd4 commit 6bf34e8

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
@@ -81,7 +81,7 @@ class UnrecognizedKeysException extends BadKeyException {
8181

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

@@ -92,8 +92,7 @@ class UnrerecognizedUnionTypeException extends BadKeyException {
9292
String get message => 'Unrecognized type: $unrecognizedType '
9393
'for union: $unionType.';
9494

95-
UnrerecognizedUnionTypeException(
96-
this.unrecognizedType, this.unionType, Map map)
95+
UnrecognizedUnionTypeException(this.unrecognizedType, this.unionType, Map map)
9796
: super._(map);
9897
}
9998

json_serializable/lib/src/decode_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ mixin DecodeHelper implements HelperCore {
163163
..write("switch (json['$discriminator']) {")
164164
..writeAll(implementations.map(buildSingleImpl), '\n')
165165
..writeln('''
166-
_ => throw UnrerecognizedUnionTypeException(
166+
_ => throw UnrecognizedUnionTypeException(
167167
'\${json['$discriminator']}',
168168
${element.name},
169169
json,

0 commit comments

Comments
 (0)