From 80c58327faaa4873369f6bb949e62792c2f708e0 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java | 35 ++++++-----------------------------
1 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java b/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java
index cdae856..63b1832 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java
@@ -26,7 +26,9 @@
*/
package org.opends.quicksetup;
+import org.opends.messages.Message;
+import org.opends.server.types.OpenDsException;
import static org.opends.quicksetup.ApplicationReturnCode.ReturnCode;
/**
@@ -38,11 +40,9 @@
* @see org.opends.quicksetup.installer.offline.OfflineInstaller
*
*/
-public class ApplicationException extends Exception
-{
- private static final long serialVersionUID = -3527273444231560341L;
+public class ApplicationException extends OpenDsException {
- private String formattedMsg = null;
+ private static final long serialVersionUID = -3527273444231560341L;
private ReturnCode type;
@@ -52,7 +52,7 @@
* @param e Exception cause
* @return ApplicationException with Type property being FILE_SYSTEM_ERROR
*/
- public static ApplicationException createFileSystemException(String msg,
+ public static ApplicationException createFileSystemException(Message msg,
Exception e)
{
return new ApplicationException(ReturnCode.FILE_SYSTEM_ACCESS_ERROR,
@@ -69,7 +69,7 @@
* @param rootCause
* the root cause of this exception.
*/
- public ApplicationException(ReturnCode type, String localizedMsg,
+ public ApplicationException(ReturnCode type, Message localizedMsg,
Throwable rootCause)
{
super(localizedMsg, rootCause);
@@ -77,21 +77,6 @@
}
/**
- * The constructor of the ApplicationException.
- * @param type the type of error we have.
- * @param localizedMsg a localized string describing the problem.
- * @param formattedMsg a localized message with extra formatting
- * @param rootCause the root cause of this exception.
- */
- public ApplicationException(ReturnCode type, String localizedMsg,
- String formattedMsg, Throwable rootCause)
- {
- super(localizedMsg, rootCause);
- this.formattedMsg = formattedMsg;
- this.type = type;
- }
-
- /**
* Returns the Type of this exception.
* @return the Type of this exception.
*/
@@ -101,14 +86,6 @@
}
/**
- * Gets the localized message with extra formatting markup.
- * @return String representing a formatted message.
- */
- public String getFormattedMessage() {
- return formattedMsg;
- }
-
- /**
* {@inheritDoc}
*/
public String toString()
--
Gitblit v1.10.0