Jump to content

error catching after compiling


Recommended Posts

is there a way to get at least which line the script crashed in when a compiled script is run as an exe by other peeps, and maybe even the command that was being executed that caused the error. im sure iv seen error catching around but only seems to be for uncompleted scripts.

%99 of peeps are happy with my program but one has decided to move all his User data and now hes getting Error at line 1 and that dont mean much to me, so i need to build in a error log or even just a message box telling me what id like to know after a crash.

cheers all.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

are you sure its not a error that youve mistaken? or maybe its his OS

Link to comment
Share on other sites

i duno what that means , so forget about the person i mentioned (he was just an example and the reason i wanted to know the answer to my question) and concentrate on the answer to "is there a way to get at least which line the script crashed in when a compiled script is run as an exe"

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

is there a way to get at least which line the script crashed in when a compiled script is run as an exe by other peeps, and maybe even the command that was being executed that caused the error. im sure iv seen error catching around but only seems to be for uncompleted scripts.

%99 of peeps are happy with my program but one has decided to move all his User data and now hes getting Error at line 1 and that dont mean much to me, so i need to build in a error log or even just a message box telling me what id like to know after a crash.

cheers all.

Try to run your script in SciTE editor, if the error is not related to OS, it will show what this error and what line. Or you can use the MsgBox() to catch a bug point.
Link to comment
Share on other sites

i mean iv got a lot of peeps with my program they dont have autoit and im not guna ask them to install it either , but i wanted to know it when it crashes on another persons machine if i can implement some kind of error message that they can tell me what it said and then i can try to figure out what is happening in there case.

the script is fine for me and for %99 of the others that use it. so it`s not an error on my part but i would like to know why this chaps is crashing so i just wondered how i could get some more info from peeps using it if it was to crash ie maybe hes moved a critical file or something but i cant tell without some kind off error message that pops up giving him more info that he can then pass on to me.

something like :-

If @crash then _Crash()

Func _crash()

messageBox("error",$lineCrashedAt & $CommandCausingCrash & $variablesValuesInvolved etc etc)

EndFunc

Kinda thing.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • Developers

this isn't available.

I usually build in some sort of logging to a file and make that optional either via commandline or INI file.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

only other option I just thought of is doing it this way:

1. created a script called testscript.au3:

If StringInStr($cmdlineraw, "/debug") Then
    If StringInStr($cmdlineraw, "/runmyscript") Then
        MsgBox(0,"secondstep","secondstep") 
    Else
        MsgBox(0,"firststep","firststep")   
        FileInstall("testscript.au3","testscript.au3",1)
        run(@ScriptFullPath & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\testscript.au3" /runmyscript /debug')
        Exit
    EndIf   
EndIf
Dim $a[4]
Msgbox(0,'error',$a[4])

When started normally it will give a line -1 error.

when started as "testscript.exe /debug" it will give an error on line 12.

This will ofcource copy the source into de script.exe directory, but you could delete that again at the end of the script.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

pweew , hold up , im still trying to get my head around it, lol

yes very neat looks like you have been at this for some time.

All it does is "ïnclude" an extra copy of your source and run that, but the thing to remember is that when you need #include's that they also need to be fileinstalled in the same way or else it will not work.

So this workaround is just to show possibilities but its far from ideal!

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

im a bit confused about the AutoIt3ExecuteScript ? does it mean that you can execute a .au3 script without having to have autoit installed ?

so your sending a copy of the script both compiled and in .au3 format and when and when you need you are basically running the .au3 and gathering the error info from that.

or am i completely wrong :D

EDIT: yea got ya sorry posted just half a sec after your response email came in,

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

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