From 4fab9c68f1e4755b7381ecf9bd86c8b30417bd8f Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 05 Sep 2007 06:40:30 +0000
Subject: [PATCH] The following changes are targetted to fix a certain number of issues related to the setup command line:
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
index 470b427..342920b 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
@@ -74,6 +74,8 @@
private HashMap<InstallProgressStep, Message> hmSummary =
new HashMap<InstallProgressStep, Message>();
+ private ApplicationException runError;
+
private static final Logger LOG =
Logger.getLogger(OfflineInstaller.class.getName());
/**
@@ -82,12 +84,13 @@
*/
public void run()
{
- initMaps();
+ runError = null;
PrintStream origErr = System.err;
PrintStream origOut = System.out;
-
try
{
+ initMaps();
+
System.setErr(getApplicationErrorStream());
System.setOut(getApplicationOutputStream());
@@ -181,6 +184,7 @@
notifyListeners(html);
LOG.log(Level.SEVERE, "Error installing.", ex);
}
+ runError = ex;
}
catch (Throwable t)
{
@@ -203,9 +207,13 @@
Message msg = getFormattedError(ex, true);
notifyListeners(msg);
LOG.log(Level.SEVERE, "Error installing.", t);
+ runError = ex;
}
- System.setErr(origErr);
- System.setOut(origOut);
+ finally
+ {
+ System.setErr(origErr);
+ System.setOut(origOut);
+ }
}
/**
@@ -225,6 +233,14 @@
}
/**
+ * {@inheritDoc}
+ */
+ public ApplicationException getRunError()
+ {
+ return runError;
+ }
+
+ /**
* Called when the user elects to cancel this operation.
*/
protected void uninstall() {
--
Gitblit v1.10.0