Vladsz83 commented on code in PR #12878:
URL: https://github.com/apache/ignite/pull/12878#discussion_r2932078837
##########
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:
However, making errors human-readable is a good practice.
--
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]