X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=adapters%2Fmso-adapters-rest-interface%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fso%2Fopenstack%2Fexceptions%2FMsoOpenstackException.java;h=f5b6c7b4f9b363f15ebe6c749786c03f54aa287a;hb=f47919f1fe367b612fa9c96d34c59f01a541e882;hp=1410650dd2d29f84f9fc5e98578092016f5461e6;hpb=54452b80a1cf4d22ef750bc1377f8c1b05431d57;p=so.git diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java index 1410650dd2..f5b6c7b4f9 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java @@ -24,57 +24,54 @@ package org.onap.so.openstack.exceptions; /** * OpenStack exception. */ -public class MsoOpenstackException extends MsoException -{ - - /** +public class MsoOpenstackException extends MsoException { + + /** * Serialization id. */ private static final long serialVersionUID = 3313636124141766495L; - + private int statusCode; - private String statusMessage; - private String errorDetail; + private String statusMessage; + private String errorDetail; + + /** + * Constructor to create a new MsoOpenstackException instance + * + * @param code the error code + * @param message the error message + * @param detail error details + */ + public MsoOpenstackException(int code, String message, String detail) { + // Set the detailed error as the Exception 'message' + super(detail); + super.category = MsoExceptionCategory.OPENSTACK; + + this.statusCode = code; + this.statusMessage = message; + this.errorDetail = detail; + } - /** - * Constructor to create a new MsoOpenstackException instance - * @param code the error code - * @param message the error message - * @param detail error details - */ - public MsoOpenstackException (int code, String message, String detail) { - // Set the detailed error as the Exception 'message' - super(detail); - super.category = MsoExceptionCategory.OPENSTACK; - - this.statusCode = code; - this.statusMessage = message; - this.errorDetail = detail; - } - - /** - * Constructor to propagate the caught exception (mostly for stack trace) + /** + * Constructor to propagate the caught exception (mostly for stack trace) + * * @param code the error code * @param message the error message * @param detail error details - * @param e the cause - */ - public MsoOpenstackException (int code, String message, String detail, Exception e) { - // Set the detailed error as the Exception 'message' - super(detail, e); - super.category = MsoExceptionCategory.OPENSTACK; - - this.statusCode = code; - this.statusMessage = message; - this.errorDetail = detail; - } + * @param e the cause + */ + public MsoOpenstackException(int code, String message, String detail, Exception e) { + // Set the detailed error as the Exception 'message' + super(detail, e); + super.category = MsoExceptionCategory.OPENSTACK; + + this.statusCode = code; + this.statusMessage = message; + this.errorDetail = detail; + } - @Override - public String toString() { - return statusCode + - " " + - statusMessage + - ": " + - errorDetail; - } + @Override + public String toString() { + return statusCode + " " + statusMessage + ": " + errorDetail; + } }