timoninmaxim commented on code in PR #12471:
URL: https://github.com/apache/ignite/pull/12471#discussion_r2469549023
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/communication/ErrorMessage.java:
##########
@@ -74,8 +87,22 @@ public ErrorMessage(@Nullable Throwable err) {
try {
return U.marshal(jdk(), err);
}
- catch (IgniteCheckedException e) {
- throw new IgniteException("Unable to marshal the holding error.",
e);
+ catch (Throwable e) {
+ if (catchSerializationErr) {
+ IgniteCheckedException wrappedErr = new
IgniteCheckedException(err.getMessage());
+
+ wrappedErr.setStackTrace(err.getStackTrace());
+ wrappedErr.addSuppressed(e);
+
+ try {
+ return U.marshal(jdk(), wrappedErr);
+ }
+ catch (Throwable ex) {
Review Comment:
ok, lets throw IgniteException, but we should catch IgniteCheckedException
(not Throwable)
--
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]