This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e455af  HOP-2941: Import from Kettle/PDI - if import fails the user 
isn't notified
     new 385ad4a  Merge pull request #857 from jballment/master
6e455af is described below

commit 6e455af57392fc905cebadc9785792dc6330feb1
Author: John Ballment <[email protected]>
AuthorDate: Tue Jun 8 17:13:23 2021 +1000

    HOP-2941: Import from Kettle/PDI - if import fails the user isn't notified
    
    Moved error handling to per file level and added logging name of file that 
was causing the error.  Still needs a message back to GUI to notify client of 
error.
---
 .../java/org/apache/hop/projects/xp/HopImportMigratedFiles.java  | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopImportMigratedFiles.java
 
b/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopImportMigratedFiles.java
index ae26b68..343b0e3 100644
--- 
a/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopImportMigratedFiles.java
+++ 
b/plugins/misc/projects/src/main/java/org/apache/hop/projects/xp/HopImportMigratedFiles.java
@@ -106,13 +106,16 @@ public class HopImportMigratedFiles implements 
IExtensionPoint<Object[]> {
                     String folderName = outFile.getParent();
                     Files.createDirectories(Paths.get(folderName));
                     StreamResult streamResult = new StreamResult(new 
File(outFilename));
-                    transformer.transform(domSource, streamResult);
+                    try {
+                        transformer.transform(domSource, streamResult);
+                    } catch(TransformerException e) {
+                        iLogChannel.logError("Error transforming '" + filename 
+ " to Hop.");
+                        e.printStackTrace();
+                    }
                 }
             }
         }catch(TransformerConfigurationException e) {
             e.printStackTrace();
-        }catch(TransformerException e) {
-            e.printStackTrace();
         } catch (IOException e) {
             e.printStackTrace();
         }

Reply via email to