1 # ============LICENSE_START===================================================
2 # Copyright (C) 2021-2022 Nordix Foundation.
3 # ============================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=====================================================
19 class InvalidDataException(Exception):
20 """Exception raised for invalid inputs.
23 message -- detail on invalid data
26 def __init__(self, invalid_message):
27 super().__init__(invalid_message)
30 class DuplicateDataException(Exception):
31 """Exception raised for duplicate inputs.
34 message -- detail on duplicate field
37 def __init__(self, duplicate_field_info):
38 super().__init__(duplicate_field_info)
41 class DataConflictException(Exception):
42 """Exception raised for conflicting data state in PMSH.
45 message -- detail on conflicting data
48 def __init__(self, data_conflict_message):
49 super().__init__(data_conflict_message)