Ayres Posted September 9, 2005 Share Posted September 9, 2005 Some programming languages allow that if it defines an error routine that always will be executed when some error to occur in the execution of the program. The AUTOIT has this resource? Link to comment Share on other sites More sharing options...
Valuater Posted September 9, 2005 Share Posted September 9, 2005 one direction is "SetError " $result = myDiv(5, 0) If @error Then MsgBox(4096,"Error", "Division by Zero") Else MsgBox(4096, "Result", $result) EndIf Exit the other is "RunErrorsFatal" Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs: 1 = fatal error (default) 0 = silent error (@error set to 1) you can find both of these in help 8) Link to comment Share on other sites More sharing options...
Ayres Posted September 10, 2005 Author Share Posted September 10, 2005 one direction is "SetError "$result = myDiv(5, 0) If @error Then MsgBox(4096,"Error", "Division by Zero") Else MsgBox(4096, "Result", $result) EndIf Exitthe other is "RunErrorsFatal" Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs:1 = fatal error (default)0 = silent error (@error set to 1) you can find both of these in helpNo. Necessary of something thus: Start program-----------------------------------------------------If error go to treatment of error-----------------------------------------------------..Program..Exit----------------------------------------------------Treatment of error----------------------------------------------------..Program of treatment of error..Return----------------------------------------------------8)<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
LxP Posted September 11, 2005 Share Posted September 11, 2005 opt("runErrorsFatal", 0) run("myProgram.exe") if (@error) then handleLaunchError() ··· ··· ··· func handleLaunchError() ··· ··· ··· endFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now