sergey-chugunov-1985 commented on code in PR #12129:
URL: https://github.com/apache/ignite/pull/12129#discussion_r2174728235


##########
modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteMessageFactoryImpl.java:
##########
@@ -106,6 +132,20 @@ public IgniteMessageFactoryImpl(MessageFactoryProvider[] 
factories) {
         return supplier.get();
     }
 
+    /**
+     * @param directType Message direct type.
+     * @return Message instance.
+     * @throws IgniteException If there are no any message factory for given 
{@code directType}.
+     */
+    @Override public MessageSerializer serializer(short directType) {
+        MessageSerializer serializer = 
msgSerializers[directTypeToIndex(directType)];
+
+        if (serializer == null)
+            throw new IgniteException("Invalid message type: " + directType);

Review Comment:
   Lets be more specific in the error message. What do you think about `Message 
serializer for a message of type <type> not found`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to