X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=multivimbroker%2Fmultivimbroker%2Fpub%2Fexceptions.py;h=3f989dad7121b1d8913b839b65b7f35305a53091;hb=65a6aa1e184dd4081cf67d3009c26302b16e5c17;hp=f11bb16aaf6c3345f9b843f4dd9fce465290075f;hpb=b1b0386b5ed988fbbf25e326c3d0ce951eff07cd;p=multicloud%2Fframework.git diff --git a/multivimbroker/multivimbroker/pub/exceptions.py b/multivimbroker/multivimbroker/pub/exceptions.py index f11bb16..3f989da 100644 --- a/multivimbroker/multivimbroker/pub/exceptions.py +++ b/multivimbroker/multivimbroker/pub/exceptions.py @@ -1,4 +1,5 @@ # Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -10,5 +11,22 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -class VimBrokerException(Exception): - pass +class BaseException(Exception): + + message = "Exception" + + def __init__(self, message=None, status_code="", content=""): + super(BaseException, self).__init__(message) + self.message = message or self.message + self.status_code = status_code + self.content = content + + +class VimBrokerException(BaseException): + + message = "vim error" + + +class NotFound(BaseException): + + message = "not found error"