source: orange/Orange/OrangeCanvas/scheme/errors.py @ 11275:031a2d259b88

Revision 11275:031a2d259b88, 612 bytes checked in by Ales Erjavec <ales.erjavec@…>, 15 months ago (diff)

Check the sink channel cardinality and link duplication when adding a new link.

Line 
1"""
2Scheme Errors
3=============
4
5"""
6
7
8class SchemeTopologyError(Exception):
9    """
10    A general scheme topology error.
11    """
12    pass
13
14
15class SchemeCycleError(SchemeTopologyError):
16    """
17    A link would create a cycle in the scheme.
18    """
19    pass
20
21
22class SinkChannelError(SchemeTopologyError):
23    """
24    Sink channel already connected.
25    """
26
27
28class DuplicatedLinkError(SchemeTopologyError):
29    """
30    A link duplicates another link already present in the scheme.
31    """
32
33
34class IncompatibleChannelTypeError(TypeError):
35    """
36    Source and sink channels do not have compatible types
37    """
Note: See TracBrowser for help on using the repository browser.