Adds support for inspecting exceptions returned from workers.

Adds the ability to iterate over output and exceptions returned from workers.