Replace mock exception with real exception

Tests fail on HHVM if mock exceptions are used
Use Generator instead of Iterator for readers