Lalant commented on code in PR #7482: URL: https://github.com/apache/ignite-3/pull/7482#discussion_r2797225000
########## modules/transactions/src/main/java/org/apache/ignite/internal/tx/TxStateMetaExceptionInfo.java: ########## @@ -0,0 +1,165 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.tx; + +import static org.apache.ignite.lang.ErrorGroups.Common.INTERNAL_ERR; + +import java.util.Objects; +import java.util.UUID; +import org.apache.ignite.internal.util.ExceptionUtils; +import org.apache.ignite.lang.TraceableException; +import org.jetbrains.annotations.Nullable; + +/** + * Transaction abort exception information stored in {@link TxStateMeta}. + * + * <p>This information is stored for cases when a transaction is aborted exceptionally and the original response to the user + * is lost (for example, due to disconnections). The stored information can later be used to understand the abort reason. + */ +public class TxStateMetaExceptionInfo { + /** Exception class name. */ + private final String exceptionClassName; + + /** Full Ignite error code (group + code), see {@link TraceableException#code()}. */ + private final int code; + + /** Trace id of the exception. If exception is not traceable will be null. */ + private final @Nullable UUID traceId; + + /** Exception message. */ + private final @Nullable String message; + + /** Original exception object. */ + private final @Nullable Throwable throwable; + + /** + * Constructor. + * + * @param exceptionClassName Exception class name. + * @param code Full error code (group + code). + * @param traceId Trace id. + * @param message Exception message. + */ + public TxStateMetaExceptionInfo(String exceptionClassName, int code, @Nullable UUID traceId, @Nullable String message) { Review Comment: Will be deleted with the whole wrapper. -- 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]
