From 15f4c4af976c56c76be7f45d306618f56157461c Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 06 Jun 2007 20:06:24 +0000
Subject: [PATCH] The commit insures that in all cases instantiation of ApplicationException is done with a localized message since this the message contained in this exception is exposed to end users.
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/BuildInformation.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/BuildInformation.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/BuildInformation.java
index f3edf5a..dd37552 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/BuildInformation.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/BuildInformation.java
@@ -101,7 +101,7 @@
}
} catch (IOException e) {
throw new ApplicationException(ApplicationException.Type.START_ERROR,
- "Error creating build info", e);
+ getMsg("error-creating-build-info"), e);
} finally {
if (is != null) {
try {
@@ -353,10 +353,14 @@
for (String prop : props) {
if (null == values.get(prop)) {
throw new ApplicationException(ApplicationException.Type.TOOL_ERROR,
- "'" + prop + "' could not be determined", null);
+ getMsg("error-prop-value", prop), null);
}
}
}
+ static private String getMsg(String key, String... args) {
+ return ResourceProvider.getInstance().getMsg(key, args);
+ }
+
}
--
Gitblit v1.10.0