Jump to content

Error handling


Recommended Posts

How do i do error handling? I have this function which allow me to run .exe. I want to catch all the error handling. What should i do?

@error?

Func installfunc()

MsgBox(0,"","error code:" & @error,"error123")

RunAsWait("","","",1,"hello.exe /SP- /SILENT /VERYSILENT")

MsgBox(0,"","Installation ","Installation Successful")

EndFunc

Link to comment
Share on other sites

How do i do error handling? I have this function which allow me to run .exe. I want to catch all the error handling. What should i do?

@error?

Func installfunc()

MsgBox(0,"","error code:" & @error,"error123")

RunAsWait("","","",1,"hello.exe /SP- /SILENT /VERYSILENT")

MsgBox(0,"","Installation ","Installation Successful")

EndFunc

@error tells you if the previous function had any errors or not.. In the example you gave you would check @error after RunAsWait() to see if Hello.exe launched ok. Its not going to tell you if hello.exe had any problems. Only functions written by autoit.

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