From 8b15a8c326165ed2fd79f776f6bcd899d95ca58e Mon Sep 17 00:00:00 2001 From: Dillon Nys Date: Mon, 22 Jan 2024 18:39:51 -0800 Subject: [PATCH] chore(core): Improve SerializationException message 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. --- packages/celest_core/lib/src/serialization/serializer.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/celest_core/lib/src/serialization/serializer.dart b/packages/celest_core/lib/src/serialization/serializer.dart index 1b6bf06f..03206109 100644 --- a/packages/celest_core/lib/src/serialization/serializer.dart +++ b/packages/celest_core/lib/src/serialization/serializer.dart @@ -109,7 +109,8 @@ final class _Serializers extends Serializers { final serializer = get(); 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;