src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java
branchJDK-8200758-branch
changeset 57140 3dcb33ce7ced
parent 57106 ea870b9ce89a
child 57150 fa68c2ab636d
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java	Wed Jan 30 19:48:18 2019 -0500
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java	Sun Feb 03 08:16:08 2019 -0500
@@ -305,7 +305,7 @@
     }
 
     File doBundle(Map<String, ? super Object> p, File outputDirectory,
-            boolean dependentTask) {
+            boolean dependentTask) throws PackagerException {
         if (Arguments.CREATE_JRE_INSTALLER.fetchFrom(p)) {
             return doJreBundle(p, outputDirectory, dependentTask);
         } else {
@@ -313,8 +313,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), "macapp-image-builder");
@@ -327,15 +327,16 @@
                 return predefined;
             }
             return rootDirectory;
+        } catch (PackagerException pe) {
+            throw pe;
         } catch (Exception ex) {
-            Log.error("Exception: "+ex);
             Log.verbose(ex);
-            return null;
+            throw new PackagerException(ex);
         }
     }
 
     File doAppBundle(Map<String, ? super Object> p, File outputDirectory,
-            boolean dependentTask) {
+            boolean dependentTask) throws PackagerException {
         try {
             File rootDirectory = createRoot(p, outputDirectory, dependentTask,
                     APP_NAME.fetchFrom(p) + ".app", "macapp-image-builder");
@@ -347,10 +348,11 @@
                 StandardBundlerParam.copyPredefinedRuntimeImage(p, appBuilder);
             }
             return rootDirectory;
+        } catch (PackagerException pe) {
+            throw pe;
         } catch (Exception ex) {
-            Log.error("Exception: "+ex);
             Log.verbose(ex);
-            return null;
+            throw new PackagerException(ex);
         }
     }
 
@@ -409,7 +411,7 @@
 
     @Override
     public File execute(Map<String, ? super Object> params,
-            File outputParentDir) {
+            File outputParentDir) throws PackagerException {
         return doBundle(params, outputParentDir, false);
     }