Modify config-api exceptions, bump config and netconf to 0.2.5-SNAPSHOT.
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / ValidationException.java
index 90b8bb6d850b91adbe30a9ba9ff707307474cb1a..68cd58d3a2a0e3f55fa073c26a9672259f940f1a 100644 (file)
@@ -16,12 +16,14 @@ import java.util.Map.Entry;
 
 /**
  * This exception is not intended to be used while implementing modules,
- * itaggregates validation exceptions and sends them back to the user.
+ * it aggregates validation exceptions and sends them back to the user.
+ * Use {@link org.opendaylight.controller.config.api.JmxAttributeValidationException} for
+ * validating modules instead.
  */
-public class ValidationException extends RuntimeException {
+public class ValidationException extends Exception {
     private static final long serialVersionUID = -6072893219820274247L;
 
-    private final Map<String, Map<String, ExceptionMessageWithStackTrace>> failedValidations;
+    private final Map<String/* module name */, Map<String/* instance name */, ExceptionMessageWithStackTrace>> failedValidations;
 
     public ValidationException(
             Map<String /* module name */, Map<String /* instance name */, ExceptionMessageWithStackTrace>> failedValidations) {
@@ -70,7 +72,7 @@ public class ValidationException extends RuntimeException {
         return new ValidationException(failedValidations);
     }
 
-    public Map<String, Map<String, ExceptionMessageWithStackTrace>> getFailedValidations() {
+    public Map<String/* module name */, Map<String/* instance name */, ExceptionMessageWithStackTrace>> getFailedValidations() {
         return failedValidations;
     }
 
@@ -140,8 +142,7 @@ public class ValidationException extends RuntimeException {
 
         @Override
         public String toString() {
-            return "ExceptionMessageWithStackTrace [message=" + message
-                    + ", stackTrace=" + stackTrace + "]";
+            return message;
         }
 
     }