Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fea837d

Browse files
authoredOct 18, 2024
Improve catch to be more specific
1 parent 2802de3 commit fea837d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎json_serializable/lib/src/helper_core.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ $converterOrKeyInstructions
7777
} else if (field.type != error.type) {
7878
try {
7979
message = '$message because of type `${typeToCode(error.type)}`';
80-
} catch (ex) {
81-
message = '$message because of type is unimplemented/unsupported/undefined';
80+
} on UnimplementedError catch (ex) {
81+
message = '$message because type is Unimplemented ($ex)';
8282
}
8383
} else {
8484
final element = error.type.element?.name;

0 commit comments

Comments
 (0)
Please sign in to comment.