Ori Liel has uploaded a new change for review. Change subject: RSDL - Throw Exception For Dir Creation Error ......................................................................
RSDL - Throw Exception For Dir Creation Error Change-Id: I9c242d3ca052f6ac596cd69b03eb3f1744ead38e Signed-off-by: Ori Liel <[email protected]> --- M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlIOManager.java 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/85/24785/1 diff --git a/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlIOManager.java b/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlIOManager.java index ae585ac..073d8a3 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlIOManager.java +++ b/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlIOManager.java @@ -25,10 +25,14 @@ copy(SCHEMA_RESOURCE_NAME, outputDir); } - private static File createOutputDirectory(String outputDirectory) { + private static File createOutputDirectory(String outputDirectory) throws IOException { File outputDir = new File(outputDirectory); if (!outputDir.exists()) { - outputDir.mkdirs(); + boolean success = outputDir.mkdirs(); + if (!success) { + throw new IOException("Falied to create directory: " + outputDirectory + + ". rsdl.xml will not be copied there."); + } } return outputDir; } -- To view, visit http://gerrit.ovirt.org/24785 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c242d3ca052f6ac596cd69b03eb3f1744ead38e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ori Liel <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
