Feature 10937: Transport API (TAPI) WIM connector for RO
[osm/RO.git] / RO-SDN-tapi / osm_rosdn_tapi / tests / exceptions.py
1 # -*- coding: utf-8 -*-
2
3 #######################################################################################
4 # This file is part of OSM RO module
5 #
6 # Copyright ETSI Contributors and Others.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License"); you may
9 # not use this file except in compliance with the License. You may obtain
10 # a copy of the License at
11 #
12 # http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 # License for the specific language governing permissions and limitations
18 # under the License.
19 #######################################################################################
20 # This work has been performed in the context of the TeraFlow Project -
21 # funded by the European Commission under Grant number 101015857 through the
22 # Horizon 2020 program.
23 # Contributors:
24 # - Lluis Gifre <lluis.gifre@cttc.es>
25 # - Ricard Vilalta <ricard.vilalta@cttc.es>
26 #######################################################################################
27
28 """This file contains the exception classes the Mock OSM RO module can raise."""
29
30
31 _PREFIX = "Mock OSM RO: "
32
33
34 class MockOsmRoError(Exception):
35 """Base Exception for all Mock OSM RO related errors."""
36
37 def __init__(self, message):
38 super().__init__(_PREFIX + message)
39
40
41 class MockOsmRoServiceNotFound(MockOsmRoError):
42 def __init__(self, service_id):
43 MESSAGE = "ServiceId({:s}) not found"
44 message = MESSAGE.format(str(service_id))
45 super().__init__(message)