Improve CPS Exception handling
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / exceptions / CpsException.java
@@ -17,7 +17,7 @@
  *  ============LICENSE_END=========================================================
  */
 
-package org.onap.cps.exceptions;
+package org.onap.cps.spi.exceptions;
 
 import lombok.Getter;
 
@@ -26,10 +26,9 @@ import lombok.Getter;
  */
 public class CpsException extends RuntimeException {
 
-    private static final long serialVersionUID = 5573438585188332404L;
+    private static final long serialVersionUID = 1592619410918497467L;
 
-    @Getter
-    String details;
+    @Getter String details;
 
     /**
      * Constructor.
@@ -46,7 +45,7 @@ public class CpsException extends RuntimeException {
      * @param message the error message
      * @param cause   the cause of the exception
      */
-    public CpsException(final  String message, final Throwable cause) {
+    public CpsException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
@@ -60,4 +59,17 @@ public class CpsException extends RuntimeException {
         super(message);
         this.details = details;
     }
+
+    /**
+     * Constructor.
+     *
+     * @param message the error message
+     * @param details the error details
+     * @param cause   the cause of the exception
+     */
+    public CpsException(final String message, final String details, final Throwable cause) {
+        super(message, cause);
+        this.details = details;
+    }
+
 }