spotify/trickle — pull request #8 by pettermahlen (2014-05-31 10:15:28+00:00)
Title: Sketch of a solution to simplify troubleshooting

Here's an incomplete and incorrect sketch for how to include more debug information when something goes wrong during graph execution. Not to be merged, just for discussion. The core idea is to track each graph invocation, and when something goes wrong, to report what happened before, including parameter values.

Things that I know are bad about the current implementation:
* I don't believe it's thread safe (but I haven't thought much about it so if I'm lucky it could be..)
* Not all tests pass (and I'm pretty sure there are others that should be written)
* I don't think that the 'debug' flag will be set correctly in all cases - in particular, I think that debug information will be tracked for 'predecessor sub-graphs', even if turned off at the root. In general, the debug flag probably lives at the wrong level; it should perhaps be set in the TraverseState directly, so as to ensure that a given execution of a graph uses the same debug setting when executing all nodes.
* It needs cleaning up in terms of javadoc, formatting, etc.

So, the main point is, does this seem like a reasonable way forward? How can it be improved?