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
13 # Copyright 2016 RIFT.io Inc
16 Exceptions for the TOSCA Translator package.
19 from rift
.mano
.tosca_translator
.common
.utils
import _
21 from toscaparser
.common
.exception
import TOSCAException
24 class ConfFileParseError(TOSCAException
):
25 msg_fmt
= _('%(message)s')
28 class ConfOptionNotDefined(TOSCAException
):
29 msg_fmt
= _('Option %(key)s in section %(section)s '
30 'is not defined in conf file')
33 class ConfSectionNotDefined(TOSCAException
):
34 msg_fmt
= _('Section %(section)s is not defined in conf file')
37 class ToscaModImportError(TOSCAException
):
38 msg_fmt
= _('Unable to import module %(mod_name)s. '
39 'Check to see that it exists and has no '
40 'language definition errors.')
43 class ToscaClassImportError(TOSCAException
):
44 msg_fmt
= _('Unable to import class %(name)s in '
45 'module %(mod_name)s. Check to see that it '
46 'exists and has no language definition errors.')
49 class ToscaClassAttributeError(TOSCAException
):
50 msg_fmt
= _('Class attribute referenced not found. '
51 '%(message)s. Check to see that it is defined.')