Add tests for other error types

Hello @x-ma, 

Please review the following commits I made in branch 'nick-errors'.

0eb4635408702130eec581fcfb15a1ed83f2e476 (2014-01-23 15:18:32 -0500)
Add tests for other error types

R=@x-ma