Changeset 11302:8a0398ce4dad in orange


Ignore:
Timestamp:
02/04/13 16:41:37 (15 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

More informative exception messages.

Location:
Orange/OrangeCanvas/scheme
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/scheme/link.py

    r11267 r11302  
    9696            raise IncompatibleChannelTypeError( 
    9797                    "Cannot connect %r to %r" \ 
    98                     % (source_channel, sink_channel) 
     98                    % (source_channel.type, sink_channel.type) 
    9999                ) 
    100100 
  • Orange/OrangeCanvas/scheme/node.py

    r11267 r11302  
    6161            if channel.name == name: 
    6262                return channel 
    63         raise ValueError("%r not found." % name) 
     63        raise ValueError("%r is not a valid input channel name for %r." % \ 
     64                         (name, self.description.name)) 
    6465 
    6566    def output_channel(self, name): 
     
    7172            if channel.name == name: 
    7273                return channel 
    73         raise ValueError("%r not found." % name) 
     74        raise ValueError("%r is not a valid output channel name for %r." % \ 
     75                         (name, self.description.name)) 
    7476 
    7577    def __str__(self): 
Note: See TracChangeset for help on using the changeset viewer.