Jump to content

get error line in compiled script


drlava
 Share

Recommended Posts

hum, I'm thinking maybe if you put some sort of com wrapper around it you migh tbe able to use the com error functionality to d osomthing like that. I almost want to say this has been done before but i wasn't able to find anything when i serached for it. Either way i think when autoit crashes it gives the line number in it's error report doesn't it?

Link to comment
Share on other sites

I got this Line:-1 error some times too.

It was when I was testing Project manager and there was bug so it created EXE file with double declared constants.

#include <GUIConstants.au3>

Const $a = 1
Const $a = 2

GUICreate("My GUI")
GUISetState (@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

When compiling click on Continue button in Au3Check error dialog and run output EXE.

This error occurs:

Line-1:

Error: Can not redeclare a constant.

Edited by Zedna
Link to comment
Share on other sites

Yeah, it gives the proper line number if the script is run from SciTe, but if compiled, it can't return a line number. Line numbers in compiled apps would be helpful in debugging COM/DOM funcationality in public progrmas where the (somewhat rare) error is created from a problem outside of the autoit script. In that case, it's usually hard for me to recreate the error, and hard for me to tell the user to download autoit and run the program from source in order to get the problematic line.

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