better error message (and partial code clarification)
more compact error message
fix indentation
Merge pull request #1201 from goodfeli/shorter_error

Shorter error