From 33420af31c50114e9a395e8444d7d60022e9f7ab Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Sat, 18 Jan 2014 01:05:03 +0000
Subject: [PATCH] Simplify config framework exception hierarchy by removing AdminRuntimeException.
---
opendj3-server-dev/src/server/org/opends/server/admin/PropertyException.java | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/admin/PropertyException.java b/opendj3-server-dev/src/server/org/opends/server/admin/PropertyException.java
index 5134d1f..a1d0f8c 100644
--- a/opendj3-server-dev/src/server/org/opends/server/admin/PropertyException.java
+++ b/opendj3-server-dev/src/server/org/opends/server/admin/PropertyException.java
@@ -39,7 +39,7 @@
* Exceptions thrown as a result of errors that occurred when decoding and
* modifying property values.
*/
-public final class PropertyException extends AdminRuntimeException
+public final class PropertyException extends RuntimeException
{
/**
@@ -183,6 +183,9 @@
+ // Message that explains the problem.
+ private final Message message;
+
/*
* The property definition associated with the property that caused the
* exception.
@@ -193,7 +196,8 @@
private PropertyException(PropertyDefinition<?> pd, Message message)
{
- super(message);
+ super(message.toString());
+ this.message = message;
this.pd = pd;
}
@@ -202,13 +206,27 @@
private PropertyException(PropertyDefinition<?> pd, Message message,
Throwable cause)
{
- super(message, cause);
+ super(message.toString(), cause);
+ this.message = message;
this.pd = pd;
}
/**
+ * 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 message;
+ }
+
+
+
+ /**
* Get the property definition associated with the property that caused the
* exception.
*
--
Gitblit v1.10.0