diff options
author | SagarS <sagar.shetty@est.tech> | 2022-01-27 15:05:50 +0000 |
---|---|---|
committer | SagarS <sagar.shetty@est.tech> | 2022-02-07 18:04:39 +0000 |
commit | 2a21c78886d13c4266da639252d8fb899b7d34a5 (patch) | |
tree | ea006b6db878c6635f3f96479c19769f9f3e0e87 /components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py | |
parent | 5b11f4ff05cf4bd3f042a4c531848b939e4ead8a (diff) |
[DCAEGEN2] Update Administrative status for measurement group2.0.0-pmsh
Issue-ID: DCAEGEN2-2820
Change-Id: I290693edc5061c21bab6e0706eda02acb52e38e1
Signed-off-by: SagarS <sagar.shetty@est.tech>
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py')
-rw-r--r-- | components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py b/components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py index 606d500c..2bee3ff9 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py +++ b/components/pm-subscription-handler/pmsh_service/mod/api/custom_exception.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2021 Nordix Foundation. +# Copyright (C) 2021-2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ class InvalidDataException(Exception): """ def __init__(self, invalid_message): - self.invalid_message = invalid_message + super().__init__(invalid_message) class DuplicateDataException(Exception): @@ -35,4 +35,15 @@ class DuplicateDataException(Exception): """ def __init__(self, duplicate_field_info): - self.duplicate_field_info = duplicate_field_info + super().__init__(duplicate_field_info) + + +class DataConflictException(Exception): + """Exception raised for conflicting data state in PMSH. + + Attributes: + message -- detail on conflicting data + """ + + def __init__(self, data_conflict_message): + super().__init__(data_conflict_message) |