changed line type handling
throw error after yielding line