Improve CPS Exception handling
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / exceptions / ModelValidationException.java
@@ -1,6 +1,6 @@
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2020 Pantheon.tech
+ *  Copyright (C) 2020 Bell Canada. All rights reserved.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
  *  ============LICENSE_END=========================================================
  */
 
-package org.onap.cps.exceptions;
+package org.onap.cps.spi.exceptions;
 
 /**
- * CP Service exception. Indicates the parameter validation failure.
+ * Yang Model Validation exception.
  */
-public class CpsValidationException extends CpsException {
+public class ModelValidationException extends CpsException {
 
-    /**
-     * Constructor.
-     *
-     * @param cause the cause of the exception
-     */
-    public CpsValidationException(final Throwable cause) {
-        super(cause.getMessage(), cause);
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param message the error message
-     * @param cause   the cause of the exception
-     */
-    public CpsValidationException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
+    private static final long serialVersionUID = 650368325928748496L;
 
     /**
      * Constructor.
      *
      * @param message the error message
      * @param details the error details
+     * @param cause   the cause of the exception
      */
-    public CpsValidationException(final String message, final String details) {
-        super(message, details);
+    public ModelValidationException(final String message, final String details, final Throwable cause) {
+        super(message, details, cause);
     }
 }