Iterate over errors

Adding the possibility to iterate through errors.