Added error reporting to main.cpp, added test for error reporting
Merge pull request #1 from henrik-muehe/errorrep

Added error reporting to main.cpp, added test for error reporting