Skip to content

Commit

Permalink
chore(core): Improve SerializationException message
Browse files Browse the repository at this point in the history
While this exception can be thrown on the client or server, it is only thrown on the client by fault of the user. And there is only one reason why this would be the case.
  • Loading branch information
dnys1 committed Jan 23, 2024
1 parent 8f66235 commit 27adcb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/celest_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.1.1-wip

- Update README
- Improve error message of `SerializationException`

## 0.1.0

Expand Down
3 changes: 2 additions & 1 deletion packages/celest_core/lib/src/serialization/serializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ final class _Serializers extends Serializers {
final serializer = get<Dart>();
if (serializer == null) {
throw SerializationException(
'No serializer found for $Dart. Did you forget to put() it?',
'No serializer found for $Dart. Did you forget to call `celest.init()` '
"at the start of your Flutter app's `main` function?",
);
}
return serializer;
Expand Down

0 comments on commit 27adcb9

Please sign in to comment.