Skip to content

Commit 6311373

Browse files
author
xlinliu
committed
日志优化
1 parent f61f756 commit 6311373

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dss-framework/dss-framework-project-server/src/main/java/com/webank/wedatasphere/dss/framework/project/utils/ExportAndImportSupportUtils.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.webank.wedatasphere.dss.framework.project.utils;
22
import com.webank.wedatasphere.dss.common.exception.DSSErrorException;
3+
import com.webank.wedatasphere.dss.common.exception.DSSRuntimeException;
34
import com.webank.wedatasphere.dss.common.utils.IoUtils;
45
import org.slf4j.Logger;
56
import org.slf4j.LoggerFactory;
@@ -54,8 +55,8 @@ public static Map<String,Path> separateFlows(String sourceDir, String projectNam
5455
copyDirectory(workflowDir, newWorkflowDir + File.separator + workflow);
5556
workFlowProjectPaths.put(workflow, Paths.get(newWorkflowDir));
5657
} catch (IOException e) {
57-
LOGGER.error("Error while copying workflow " + workflow + ": " + e);
58-
throw new DSSErrorException(70001, "复制工作流失败,原因为:" + e);
58+
LOGGER.error("Error while copying workflow directory " , e);
59+
throw new DSSRuntimeException(70001, "导入多个工作流时分离工作流失败,原因为:" + e.getMessage(),e);
5960
}
6061

6162

@@ -80,7 +81,7 @@ private static void copyDirectory(String sourceDirectory, String destinationDire
8081
Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING);
8182
}
8283
} catch (IOException e) {
83-
e.printStackTrace();
84+
throw new RuntimeException(e);
8485
}
8586
});
8687
}

0 commit comments

Comments
 (0)