improve coffeescript error outputs to handle generic errors

fixes #319