Add each() method to stream
Return an error if the iterator throws an exception