Jump to content

ERror trapping


Recommended Posts

How can I get the meaning of the number in @error ? I want to include the

error's description in my error log file.

Is an @error <> 0 the same thing as a COM error ?

andynewbie

meaning of @error? For which function????

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

As /dev/null said earlier you will need to know what function your working with and look in the help file for that function and find out what the possible @errors may be.

Then do something like this

$var = FileRead("C:\me")
select
Case @error = 1 
    MsgBox(0, "", "file not opened in read mode or other error")
Case @error = -1
    MsgBox(0, "", "end-of-file is reached")
EndSelect

Yes, I have seen the explanations of the @error code, which differ depending

on the function call. I was hoping the error description was stored in a known

location, like another @macro that always holds the meaning of the @error code.

Link to comment
Share on other sites

Yes, I have seen the explanations of the @error code, which differ depending

on the function call. I was hoping the error description was stored in a known

location, like another @macro that always holds the meaning of the @error code.

well, it is stored in a variable, IF you put it in there :whistle:

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

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...