anton-vinogradov commented on code in PR #12878:
URL: https://github.com/apache/ignite/pull/12878#discussion_r2932012082


##########
modules/codegen/src/main/java/org/apache/ignite/internal/MessageSerializerGenerator.java:
##########
@@ -949,8 +969,28 @@ private void finish(List<String> code, boolean read, 
boolean marshallable) {
         code.add(EMPTY);
 
         if (read && marshallable) {
+            imports.add("org.apache.ignite.IgniteCheckedException");
+            imports.add("org.apache.ignite.IgniteException");
+
+            code.add(identedLine("try {"));
+
+            indent++;
+
             code.add(identedLine("msg.finishUnmarshal(marshaller, clsLdr);"));
 
+            indent--;
+
+            code.add(identedLine("}"));
+            code.add(identedLine("catch (IgniteCheckedException e) {"));
+
+            indent++;
+
+            code.add(identedLine("throw new IgniteException(\"Failed to 
unmarshal object\", e);"));

Review Comment:
   It's clear AFAICS by stacktrace.



##########
modules/codegen/src/main/java/org/apache/ignite/internal/MessageSerializerGenerator.java:
##########
@@ -280,9 +280,29 @@ private void start(Collection<String> code, boolean write) 
{
             returnFalseIfWriteFailed(code, "writer.writeHeader", 
"directType()");
 
             if (write && marshallableMessage()) {
+                imports.add("org.apache.ignite.IgniteCheckedException");
+                imports.add("org.apache.ignite.IgniteException");
+
                 code.add(EMPTY);
 
+                code.add(identedLine("try {"));
+
+                indent++;
+
                 code.add(identedLine("msg.prepareMarshal(marshaller);"));
+
+                indent--;
+
+                code.add(identedLine("}"));
+                code.add(identedLine("catch (IgniteCheckedException e) {"));
+
+                indent++;
+
+                code.add(identedLine("throw new IgniteException(\"Failed to 
marshal object\", e);"));

Review Comment:
   It's clear AFAICS by stacktrace.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to