quantumcore.experiments /

Full commit

class QuantumBusterException(Exception):
    """superclass for all QuantumBuster related errors"""
# storage related exceptions

class StorageError(QuantumBusterException):
    """general storage related error"""

class ObjectNotFound(StorageError):
    """an object couldn't be found"""
    def __init__(self, id): = id
    def __str__(self):
        return u"couldn't find object with id <%s>" %repr(

class DuplicateNodeName(QuantumBusterException):
    """a child node with an already existing name has been tried to be added to a node"""
    def __init__(self, node, existing_node, parent_node, name):
        self.node = node # the node which was tried to be added
        self.existing_node = existing_node # the node which already is attached to the parent with the same name
        self.parent_node = parent_node # the parent node = name # the colliding name
    def __str__(self):
        return u"parent node <%s> already contains node <%s> with the name '%s'" %(self.parent_node.node_id, 
class StorageError(QuantumBusterException):
    """a generic Storage error"""
    def __init__(self, storage, msg): = storage
        self.msg = msg
    def __str__(self):
        return self.msg