diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java index 0b80561ac3..c1fb3fb3ad 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/util/ConfigUtil.java @@ -54,7 +54,8 @@ public static void checkGremlinConfig(String conf) { try { yamlConfig.load(conf); } catch (ConfigurationException e) { - throw new HugeException("Failed to load yaml config file ", conf); + throw new HugeException("Failed to load yaml config file '%s'", + conf); } List nodes = yamlConfig.getRootNode() .getChildren(NODE_GRAPHS); @@ -100,7 +101,7 @@ public static void writeToFile(String dir, String graphName, config.setFileName(fileName); LOG.info("Write HugeConfig to file: '{}'", fileName); } catch (IOException | ConfigurationException e) { - throw new HugeException("Failed to write HugeConfig to file '{}'", + throw new HugeException("Failed to write HugeConfig to file '%s'", e, fileName); } } @@ -112,7 +113,7 @@ public static void deleteFile(File file) { try { FileUtils.forceDelete(file); } catch (IOException e) { - throw new HugeException("Failed to delete HugeConfig file '{}'", + throw new HugeException("Failed to delete HugeConfig file '%s'", e, file); } }