Jump to content

Error Checking


Recommended Posts

$CDDir = FileReadLine ($file, 18)
    $Shortcuts = FileReadLine ($file, 21)
    $ShortDir = FileReadLine ($file, 24)
        If @error <> 0 Then
            ErrorFunc ("The data in the " & @ScriptDir & "\Data\F4DP.cfg file is missing or corrupt.", _
                "GetUserData-FileReadLine")
        EndIf

Will this check for errors on all 3 instances of FileReadLine or just the last one?

-DRX
Link to comment
Share on other sites

Only the last instance will be error-checked, but if the last call generates an error then you can probably safely bet that the first two also did.

Also, the following two lines of code are equivalent:

if @error <> 0 then
if @error then
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...