--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinAppBundler.java Wed Jan 30 19:48:18 2019 -0500
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinAppBundler.java Sun Feb 03 08:16:08 2019 -0500
@@ -168,12 +168,13 @@
return "app\\" + getAppName(p) +".cfg";
}
- public boolean bundle(Map<String, ? super Object> p, File outputDirectory) {
+ public boolean bundle(Map<String, ? super Object> p, File outputDirectory)
+ throws PackagerException {
return doBundle(p, outputDirectory, false) != null;
}
- File doBundle(Map<String, ? super Object> p,
- File outputDirectory, boolean dependentTask) {
+ File doBundle(Map<String, ? super Object> p, File outputDirectory,
+ boolean dependentTask) throws PackagerException {
if (Arguments.CREATE_JRE_INSTALLER.fetchFrom(p)) {
return doJreBundle(p, outputDirectory, dependentTask);
} else {
@@ -181,8 +182,8 @@
}
}
- File doJreBundle(Map<String, ? super Object> p,
- File outputDirectory, boolean dependentTask) {
+ File doJreBundle(Map<String, ? super Object> p, File outputDirectory,
+ boolean dependentTask) throws PackagerException {
try {
File rootDirectory = createRoot(p, outputDirectory, dependentTask,
APP_NAME.fetchFrom(p), "windowsapp-image-builder");
@@ -196,15 +197,16 @@
return predefined;
}
return rootDirectory;
- } catch (Exception ex) {
- Log.error("Exception: "+ex);
- Log.verbose(ex);
- return null;
+ } catch (PackagerException pe) {
+ throw pe;
+ } catch (Exception e) {
+ Log.verbose(e);
+ throw new PackagerException(e);
}
}
- File doAppBundle(Map<String, ? super Object> p,
- File outputDirectory, boolean dependentTask) {
+ File doAppBundle(Map<String, ? super Object> p, File outputDirectory,
+ boolean dependentTask) throws PackagerException {
try {
File rootDirectory = createRoot(p, outputDirectory, dependentTask,
APP_NAME.fetchFrom(p), "windowsapp-image-builder");
@@ -221,10 +223,11 @@
outputDirectory.getAbsolutePath()));
}
return rootDirectory;
- } catch (Exception ex) {
- Log.error("Exception: "+ex);
- Log.verbose(ex);
- return null;
+ } catch (PackagerException pe) {
+ throw pe;
+ } catch (Exception e) {
+ Log.verbose(e);
+ throw new PackagerException(e);
}
}
@@ -300,8 +303,8 @@
}
@Override
- public File execute(
- Map<String, ? super Object> params, File outputParentDir) {
+ public File execute(Map<String, ? super Object> params,
+ File outputParentDir) throws PackagerException {
return doBundle(params, outputParentDir, false);
}