00001 # -*- Python -*- 00002 # -*- coding: utf-8 -*- 00003 00004 '''rtsprofile 00005 00006 Copyright (C) 2009-2010 00007 Geoffrey Biggs 00008 RT-Synthesis Research Group 00009 Intelligent Systems Research Institute, 00010 National Institute of Advanced Industrial Science and Technology (AIST), 00011 Japan 00012 All rights reserved. 00013 Licensed under the Eclipse Public License -v 1.0 (EPL) 00014 http://www.opensource.org/licenses/eclipse-1.0.txt 00015 00016 File: exceptions.py 00017 00018 Exceptions that may occur. 00019 00020 ''' 00021 00022 __version__ = '$Revision: $' 00023 # $Source$ 00024 00025 00026 ############################################################################## 00027 ## Exception types 00028 00029 class RtsProfileError(Exception): 00030 '''Base exception for all RtsProfile errors.''' 00031 pass 00032 00033 00034 class MultipleSourcesError(Exception): 00035 '''Multiple XML sources were given.''' 00036 pass 00037 00038 00039 class InvalidTypeError(RtsProfileError): 00040 '''Tried to set an attribute using an invalid type.''' 00041 pass 00042 00043 00044 class RequiredAttributeError(RtsProfileError): 00045 '''Tried to set a required attribute as empty.''' 00046 pass 00047 00048 00049 class InvalidCompositeTypeError(RtsProfileError): 00050 '''Tried to convert an invalid string to a CompositeType constant.''' 00051 pass 00052 00053 00054 class InvalidDirectionError(RtsProfileError): 00055 '''Tried to convert an invalid string to a Direction constant.''' 00056 pass 00057 00058 00059 class InvalidDataPortConnectorNodeError(RtsProfileError): 00060 '''A data port connector node's XML is invalid (e.g. too many children).''' 00061 pass 00062 00063 00064 class InvalidParticipantNodeError(RtsProfileError): 00065 '''A participant node's XML is invalid (e.g. too many children).''' 00066 pass 00067 00068 00069 class InvalidRtsProfileNodeError(RtsProfileError): 00070 '''The RtsProfile node's XML is invalid (e.g. too many children of a 00071 certain type).''' 00072 pass 00073 00074 00075 class InvalidServicePortConnectorNodeError(RtsProfileError): 00076 '''A service port connector node's XML is invalid (e.g. too many 00077 children). 00078 00079 ''' 00080 pass 00081 00082 class MissingComponentError(RtsProfileError): 00083 '''A component expected to be present (e.g. by a TargetPort) is not.''' 00084 pass 00085 00086 00087 # vim: tw=79 00088