X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fspi%2Fexceptions%2FModelValidationException.java;fp=cps-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fexceptions%2FCpsValidationException.java;h=04a8836acab3e882255383a590499bb19772c952;hb=098a93c84aae8d8d74e7589518a576b84c38ca27;hp=8e049c66e4a0ad71e9f9af05f1b5b1da08d3e3f4;hpb=9647834359b168ed8091cecaecd363cb87abe874;p=cps.git diff --git a/cps-service/src/main/java/org/onap/cps/exceptions/CpsValidationException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/ModelValidationException.java similarity index 59% rename from cps-service/src/main/java/org/onap/cps/exceptions/CpsValidationException.java rename to cps-service/src/main/java/org/onap/cps/spi/exceptions/ModelValidationException.java index 8e049c66e..04a8836ac 100644 --- a/cps-service/src/main/java/org/onap/cps/exceptions/CpsValidationException.java +++ b/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. @@ -17,39 +17,23 @@ * ============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); } }