added check for unexpected compiler errors

Closes gh-74.