Use adapter for handling exceptions from output.

Should use an adapter for uniform exception handling.