From de19fe2956d5a4b3817834191c51989664f8c47c Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 03 Sep 2007 20:36:20 +0000
Subject: [PATCH] Fix issue 1443: Admin framework: improve error logging in server

---
 opends/src/server/org/opends/server/admin/AdminRuntimeException.java |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/opends/src/server/org/opends/server/admin/AdminRuntimeException.java b/opends/src/server/org/opends/server/admin/AdminRuntimeException.java
index 15a2be7..304124c 100644
--- a/opends/src/server/org/opends/server/admin/AdminRuntimeException.java
+++ b/opends/src/server/org/opends/server/admin/AdminRuntimeException.java
@@ -26,34 +26,21 @@
  */
 
 package org.opends.server.admin;
+
+
+
 import org.opends.messages.Message;
 
 
 
 /**
- * Exceptions thrown when interacting with administration framework that
- * applications are not expected to catch.
+ * Exceptions thrown when interacting with administration framework
+ * that applications are not expected to catch.
  */
 public abstract class AdminRuntimeException extends RuntimeException {
 
-  /**
-   * Create an admin runtime exception.
-   */
-  protected AdminRuntimeException() {
-    // No implementation required.
-  }
-
-
-
-  /**
-   * Create an admin runtime exception with a cause.
-   *
-   * @param cause
-   *          The cause.
-   */
-  protected AdminRuntimeException(Throwable cause) {
-    super(cause);
-  }
+  // Message that explains the problem.
+  private final Message message;
 
 
 
@@ -67,6 +54,7 @@
    */
   protected AdminRuntimeException(Message message, Throwable cause) {
     super(message.toString(), cause);
+    this.message = message;
   }
 
 
@@ -79,5 +67,18 @@
    */
   protected AdminRuntimeException(Message message) {
     super(message.toString());
+    this.message = message;
+  }
+
+
+
+  /**
+   * Returns the message that explains the problem that occurred.
+   *
+   * @return Returns the message describing the problem that occurred
+   *         (never <code>null</code>).
+   */
+  public Message getMessageObject() {
+    return this.message;
   }
 }

--
Gitblit v1.10.0