tmgodinho commented on code in PR #6387:
URL: https://github.com/apache/ignite-3/pull/6387#discussion_r2268095791


##########
migration-tools/modules/migration-tools-cli/src/main/java/org/apache/ignite/migrationtools/cli/exceptions/DataStreamerExceptionHandler.java:
##########
@@ -17,18 +17,36 @@
 
 package org.apache.ignite.migrationtools.cli.exceptions;
 
+import 
org.apache.ignite.migrationtools.persistence.exceptions.MigrateCacheException;
 import 
org.apache.ignite.migrationtools.persistence.mappers.RecordAndTableSchemaMismatchException;
 import org.apache.ignite3.internal.cli.core.exception.ExceptionHandler;
 import org.apache.ignite3.internal.cli.core.exception.ExceptionWriter;
+import org.apache.ignite3.internal.cli.core.style.component.ErrorUiComponent;
 import org.apache.ignite3.table.DataStreamerException;
 
 /** DataStreamerExceptionHandler. */
 public class DataStreamerExceptionHandler implements 
ExceptionHandler<DataStreamerException> {
     @Override
     public int handle(ExceptionWriter writer, DataStreamerException e) {
-        if (e.getCause() instanceof RecordAndTableSchemaMismatchException) {
-            return 
RecordAndTableSchemaMismatchExceptionHandler.INSTANCE.handle(
-                    writer, (RecordAndTableSchemaMismatchException) 
e.getCause());
+        if (e.getCause() instanceof MigrateCacheException) {
+            MigrateCacheException mce = (MigrateCacheException) e.getCause();
+
+            String details;
+            if (e.getCause().getCause() instanceof 
RecordAndTableSchemaMismatchException) {
+                RecordAndTableSchemaMismatchException rme = 
(RecordAndTableSchemaMismatchException) mce.getCause();
+                details = 
RecordAndTableSchemaMismatchExceptionHandler.details(rme);
+            } else {
+                details = "Unknown error. Check the logs folder for more 
information.";

Review Comment:
   This is the generic case, so I think this remark does not make sense.



-- 
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