1. 17 8月, 2011 1 次提交
    • David Warde-Farley's avatar
      Remove annoying raise_with_op behaviour, document. · cefc5553
      David Warde-Farley 提交于
      This adds a docstring for raise_with_op and also modifies its behaviour
      somewhat. Previously, the exception was re-raised with a different
      'args' member -- namely, in addition to the exception message it added
      two new elements to the tuple: the Op itself and a string telling you
      where in the graph the corresponding Apply node appeared.
      
      This gets in the way if you want to have an exception message containing
      formatting (newlines and tabs), since the entire tuple is printed, and
      the formatting on the string is not rendered.
      
      I've never seen the Apply node index be of use to anyone debugging, but
      my proposed solution is to stash that information in __op_instance__
      and __applynode_index__ on the object instead of in the args tuple.
      I would not be against appending to args[0], the exception message,
      with applynode information, but this is easy enough to obtain at the
      pdb prompt with my modifications.
      cefc5553
  2. 13 8月, 2011 12 次提交
  3. 12 8月, 2011 18 次提交
  4. 11 8月, 2011 9 次提交