1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
14 Exceptions for the TOSCA Translator package.
17 from toscaparser.common.exception import TOSCAException
18 from toscaparser.utils.gettextutils import _
21 class ConfFileParseError(TOSCAException):
22 msg_fmt = _('%(message)s')
25 class ConfOptionNotDefined(TOSCAException):
26 msg_fmt = _('Option %(key)s in section %(section)s '
27 'is not defined in conf file')
30 class ConfSectionNotDefined(TOSCAException):
31 msg_fmt = _('Section %(section)s is not defined in conf file')
34 class ToscaModImportError(TOSCAException):
35 msg_fmt = _('Unable to import module %(mod_name)s. '
36 'Check to see that it exists and has no '
37 'language definition errors.')
40 class ToscaClassImportError(TOSCAException):
41 msg_fmt = _('Unable to import class %(name)s in '
42 'module %(mod_name)s. Check to see that it '
43 'exists and has no language definition errors.')
46 class ToscaClassAttributeError(TOSCAException):
47 msg_fmt = _('Class attribute referenced not found. '
48 '%(message)s. Check to see that it is defined.')