Add test for sub-cadence error handling.

Closes #79.