throws exception if unexpected cases (from users) happen
uses std::vector::empty() for checking no more records
Adds error case tests
Merge pull request #1 from laysakura/feature/exceptions

Feature/exceptions