diff options
author | tian.ming@huawei.com <tian.ming@huawei.com> | 2016-09-23 10:32:44 +0800 |
---|---|---|
committer | tian.ming@huawei.com <tian.ming@huawei.com> | 2016-09-23 10:32:44 +0800 |
commit | b44388f5e377f0cb96610b91e609110620246f2c (patch) | |
tree | b4480ea452ce3ede472dd7bc66e2cea4362df528 /rest-client/src/main | |
parent | 06778569c31d3b880dd1348b145c583bed950945 (diff) |
add the ServiceException Constructor(httpcode and message)
Change-Id: I335a3a7a40085b56c74af0ce135a317aa60ecd33
Signed-off-by: tian.ming@huawei.com <tian.ming@huawei.com>
Diffstat (limited to 'rest-client/src/main')
-rw-r--r-- | rest-client/src/main/java/org/openo/baseservice/remoteservice/exception/ServiceException.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rest-client/src/main/java/org/openo/baseservice/remoteservice/exception/ServiceException.java b/rest-client/src/main/java/org/openo/baseservice/remoteservice/exception/ServiceException.java index 91f6acf..378fe9f 100644 --- a/rest-client/src/main/java/org/openo/baseservice/remoteservice/exception/ServiceException.java +++ b/rest-client/src/main/java/org/openo/baseservice/remoteservice/exception/ServiceException.java @@ -114,6 +114,21 @@ public class ServiceException extends Exception { this.setId(id); this.setHttpCode(httpCode); } + + /** + * Constructor<br/> + * <p> + * the exception include the httpcode and message. + * </p> + * + * @since + * @param httpCode http code. + * @param message details. + */ + public ServiceException(final int httpCode, final String message) { + super(message); + this.setHttpCode(httpCode); + } /** * Constructor<br/> |