summaryrefslogtreecommitdiffstats
path: root/base/server/cms/src/org/dogtagpki/server
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-01-20 09:25:32 -0500
committerEndi S. Dewata <edewata@redhat.com>2015-01-21 15:35:37 -0500
commit802f7471d5ee65e3c4d99b528bb6d8526c277185 (patch)
tree02dd03d41e301499b0b28fbd0af948f253bac03d /base/server/cms/src/org/dogtagpki/server
parentdeb188bffd38f82396c47411381a875020ca748b (diff)
downloadpki-802f7471d5ee65e3c4d99b528bb6d8526c277185.tar.gz
pki-802f7471d5ee65e3c4d99b528bb6d8526c277185.tar.xz
pki-802f7471d5ee65e3c4d99b528bb6d8526c277185.zip
Added support for exception chains in EBaseException.
The EBaseException has been modified to provide constructors that can be used to chain the cause of the exception. This way the root cause of the exception can be traced back to help troubleshooting. Some codes have been modified to utilize the proper exception chaining as examples. https://fedorahosted.org/pki/ticket/915
Diffstat (limited to 'base/server/cms/src/org/dogtagpki/server')
-rw-r--r--base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java b/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java
index 47048c31a..a594dad05 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java
@@ -174,7 +174,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
cs.commit(false);
} catch (EBaseException e) {
CMS.debug(e);
- throw new PKIException("Unable to commit config parameters to file");
+ throw new PKIException("Unable to commit config parameters to file", e);
}
initializeDatabase(data);
@@ -200,8 +200,8 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
ConfigurationUtils.setCertPermissions(cert.getCertTag());
CMS.debug("Processed '" + cert.getCertTag() + "' certificate.");
} catch (Exception e) {
- e.printStackTrace();
- throw new PKIException("Error in configuring system certificates" + e);
+ CMS.debug(e);
+ throw new PKIException("Error in configuring system certificates" + e, e);
}
if (ret != 0) {
throw new PKIException("Error in configuring system certificates");
@@ -234,8 +234,8 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
try {
ConfigurationUtils.removePreopConfigEntries();
} catch (EBaseException e) {
- e.printStackTrace();
- throw new PKIException("Errors when removing preop config entries: " + e);
+ CMS.debug(e);
+ throw new PKIException("Errors when removing preop config entries: " + e, e);
}
// Create an empty file that designates the fact that although
@@ -915,8 +915,8 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
cs.putString("securitydomain.host", host);
cs.putInteger("securitydomain.httpsadminport",port);
} catch (Exception e) {
- e.printStackTrace();
- throw new PKIException("Failed to resolve security domain URL");
+ CMS.debug(e);
+ throw new PKIException("Failed to resolve security domain URL", e);
}
getCertChainFromSecurityDomain(host, port);
@@ -957,8 +957,8 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
try {
installToken = ConfigurationUtils.getInstallToken(host, port, user, pass);
} catch (Exception e) {
- e.printStackTrace();
- throw new PKIException("Failed to obtain installation token from security domain: " + e);
+ CMS.debug(e);
+ throw new PKIException("Failed to obtain installation token from security domain: " + e, e);
}
if (installToken == null) {