Source code for rocon_app_utilities.exceptions

#!/usr/bin/env python
#
# License: BSD
#   https://raw.github.com/robotics-in-concert/rocon_app_platform/license/LICENSE
#
#################################################################################


[docs]class RappException(Exception): """ Rapp Exception """ pass
[docs]class InvalidRappException(RappException): ''' Invalid format of rapp ''' pass
[docs]class ParentRappNotFoundException(RappException): ''' Parent Not Found Exception ''' def __init__(self, resource_name, parent_name): self.resource_name = resource_name self.parent_name = parent_name
[docs]class RappInvalidChainException(RappException): ''' If the rapp chain is invalid. ''' pass
[docs]class RappAncestorConflictException(RappException): ''' If indexer found two implementation with the same ancestor ''' pass
[docs]class RappCyclicChainException(RappException): ''' If the rapp includes cyclic chain. e.g child -> parent -> child -> .... ''' def __init__(self, stack): self.stack = stack def __strc__(self): return str(self.stack)
[docs]class RappNotExistException(RappException): ''' When Rapp does not exist ''' pass
[docs]class InvalidRappFieldException(RappException): ''' It does not satisfy required or not allowed field ''' def __init__(self, cls, invalid_required, invalid_not_allowed): self.cls = cls self.invalid_required = invalid_required self.invalid_not_allowed = invalid_not_allowed def __str__(self): return str('\n\t' + str(self.cls) + '\n\tMissing Requirements - ' + str(self.invalid_required) + '\n\tInvalid Not Allowed - ' + str(self.invalid_not_allowed))
[docs]class RappResourceNotExistException(RappException): ''' Rapp Attribute Resource does not exist... ''' pass
[docs]class RappMalformedException(RappException): ''' If rapp contains missing key... '''
[docs]class UnsupportedPlatformException(Exception): ''' If running on a platform not supported by rosdep. ''' pass
[docs]class NonInstallableRappException(Exception): ''' If Rapp cannot be installed. ''' pass
[docs]class XmlParseException(Exception): ''' Error with the XML syntax (e.g. invalid attribute/value combinations) ''' pass