Extract errors to their own file. Add documentation
Merge pull request #601 from projecthydra/add_documentation_to_errors

Extract errors to their own file. Add documentation