Test error handling.

Closes #10.