Various technologies and techniques are disclosed that improve failure
handling and debugging in message driven environments. A diagramming tool
allows a user to graphically nest one or more functional components of
the data flow diagram to create a fault handler. The fault handler is
associated with a failure component to be called when a failure occurs
within any one or more of the nested functional components. One or more
application executables are synthesized from the data flow diagram. When
the nested component is created at runtime, a causality is created for
the nested component. The causality has an exception port for receiving
fault messages that are unhandled within the nested data flow associated
with the nested component. The causality also has a coordination port to
allow any messages in the causality context and/or other applications to
access the error history and the message coordination history.