Jump to content

Less generic error message?


Recommended Posts

My app has a weird error that we have been trying to track for a while now. 

The trouble is when the compiled exe crashes, it gives a generic error message (below).

Is there a way to have a more helpful message?

image.png

###########################################################################

I'm Niceygy, but you can call me nicey (nice-ee).

AutoIT, JS & C# Dev. I'm no expert!

############################################################################

Link to comment
Share on other sites

  • Developers

The error is not generic, and you are informed about the exact error and the line number.
So merge the script with au3stripper to understand what that line number really is, or post the code when you want more help! 

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

What do you mean "merge the script"? 

Also the line number is useless because the code is compiled, and the issue (annoyingly enough) doesn't seems to occur when not compiled.

 

###########################################################################

I'm Niceygy, but you can call me nicey (nice-ee).

AutoIT, JS & C# Dev. I'm no expert!

############################################################################

Link to comment
Share on other sites

  • Moderators

Niceygy,

Quote

What do you mean "merge the script"? 

Use Au3Stripper with the /MergeOnly flag to get the full script file as passed to Aut2Exe - then the line numbers will match. See SciTE help for more full details. You will need the full SciTE4AutoIt3 package to do this.

But better still - debug the script and prevent the error by adding some form of errorchecking code.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Posted (edited)

This happened to me recently. First be sure you're using the full SciTE editor. Then add the following to the directives at the top:

#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/mo

When you next compile it, a version of your script with "_stripped" appended to the filename will be created. When you open that one up, the line number in the error will make sense. If you have a lot of commented lines in your code, the number might be off a little but it'll be in the vicinity.

Edited by rsn
Link to comment
Share on other sites

6 hours ago, Melba23 said:

Niceygy,

Use Au3Stripper with the /MergeOnly flag to get the full script file as passed to Aut2Exe - then the line numbers will match. See SciTE help for more full details. You will need the full SciTE4AutoIt3 package to do this.

But better still - debug the script and prevent the error by adding some form of errorchecking code.

M23

Ah, I see! Thanks 

And the error checking I have at the moment is:

While @error == 0 Or $finished == False

Because apparently autoit doesn't have try-catch. :( Any better ideas welcome lol

###########################################################################

I'm Niceygy, but you can call me nicey (nice-ee).

AutoIT, JS & C# Dev. I'm no expert!

############################################################################

Link to comment
Share on other sites

So apparently my stripped file only goes to 10k lines, and the error is on line 19k. What have I done wrong? 😅

###########################################################################

I'm Niceygy, but you can call me nicey (nice-ee).

AutoIT, JS & C# Dev. I'm no expert!

############################################################################

Link to comment
Share on other sites

Posted (edited)

Briefly:

you must have it installed:  SciTE4AutoIt3
you put at the top of the script

#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/mo

then go to the Compiled process  Ctrl F7
this has the effect of creating an additional single script with all #includes embedded , named_stripped.au3

https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Au3Stripper.html

Edited by ioa747

I know that I know nothing

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