What you do is:
;Open file
;If no error occurs, the return value and the errorlevel are both 0
;Here you check the return value

If Open($Handle1,$csv) = 0
   
;Read the first line
    ;If there is no line to read, the errorlevel is different from 0
    $read=ReadLine($Handle1)
   
While @ERROR = 0
       
;Do stuff
       
       
;Read the next line and go to while
        ;If errorlevel is not 0, There was no line to read anymore
        ;In that case, continue after Loop
        $read=ReadLine($Handle1)
   
Loop
    ;Close file
    $RC = Close($Handle1)
EndIf