Jump to content

Recommended Posts

Posted (edited)

Hey there,

I didn't really know how to name the titel .. so let me explain it a bit further.
You all might know that a compiled Autoit-Exe gives an error message containing the Error and the line when it crashes. Often those messages aren't usefull because it states the line in the compiled script is not the line in your script if you have used includes. Decompiling the exe often doesn't help either. Well .. I don't want to start a discussion about the benefits of those messages.
I just want to disable them. I want my exe to just fail an crash and that's it. Nothing more. When there's an error there's an error. Autoit is the only language I have ever noticed those message boxes.

I think now you can understand me .. :D

Do you know any way to do this?
Some compiler options or so? Or is it that deep implemented in Autoit that it can't be removed?

Thanks for your help!
Leo1906

Edited by Leo1906
  • Moderators
Posted

Leo1906,

  Quote

Decompiling the exe

Expand  

You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing decompilation (and even mentioning it is not a good idea) - before you post again.

  Quote

 the line in the compiled script is not the line in your script if you have used includes

Expand  

It can be if you use Au3Stripper with the /MergeOnly option before compiling.

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:

  Reveal hidden contents

 

Posted
  On 7/14/2016 at 9:19 PM, Melba23 said:

Leo1906,

You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing decompilation (and even mentioning it is not a good idea) - before you post again.

It can be if you use Au3Stripper with the /MergeOnly option before compiling.

M23

 

Expand  

Ok you're right. So let's not talk about decompiling aggain.
And thanks for the info on the /MergeOnly :)

.. but this doesn't answer the question. It's not about how usefull it might be. In my opinion those messages are just ugly and I don't want them to appear.

An example I noticed today:
I was trying to read a really huge csv to an array and the program failed, saying that it was to much data for an array.
Nice to know (for me the developer) but completly useless for somebody who doesn't know about those things. It could even be frightening.

Posted

It's the responsibility of the developer to check, for example, if too much data is being read into an array and take the appropriate action to prevent an error occurring in the first place. A well written application will not produce the error messages you want to get rid of.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Posted
  On 7/14/2016 at 10:02 PM, Bowmore said:

It's the responsibility of the developer to check, for example, if too much data is being read into an array and take the appropriate action to prevent an error occurring in the first place. A well written application will not produce the error messages you want to get rid of.

Expand  

Why does everybody seems to only glance on the Offtopic parts of this thread?

I think there can always be unexpected errors. In my example the maximum length of an array was exceeded. Didn't thought this would happen. (it would have been an array with over 1.000.000 entries,

Despite that I don't think that there are many programs out there wich would definitly never crash, because the developer/s checked every detail meticulously.

 

Please focus on the question and if you have nothing to contribute to the topic than just let it be ..
Thanks :)

Posted
  On 7/14/2016 at 10:08 PM, Leo1906 said:

Please focus on the question and if you have nothing to contribute to the topic than just let it be ..
Thanks :)

Expand  

Ahem, this is a public forum.  Members are responding as they see fit.  I'm sorry you don't like it, but that's not their problem.

Sure, there can always be unexpected errors, but a robust program is as efficient and error free as possible.  There is no reason why a script can't be designed to address known conditions/limits that could cause the script to fail.  


Search the forum for Error Handling to get some ideas.

 

Posted (edited)
  On 7/14/2016 at 9:25 PM, Leo1906 said:

Ok you're right. So let's not talk about decompiling aggain.

Expand  

In this forum you mustn't talk about decompiling. Read about Software License in helpfile specialy:

  Quote

Reverse engineering. You may not reverse engineer or disassemble the SOFTWARE PRODUCT.

Expand  

I think @Jos isn't amused about your intend

Edited by AutoBert
Posted
  On 7/14/2016 at 11:11 PM, AutoBert said:

In this forum you mustn't talk about decompiling. Read about Software License in helpfile specialy:

 

Expand  

Haha ok I can do this too ..

The License says:

  Quote

The definition of SOFTWARE PRODUCT does not includes any files generated by the SOFTWARE PRODUCT, such as compiled script files in the form of standalone executables.

Expand  
  Quote

Reverse engineering. You may not reverse engineer or disassemble the SOFTWARE PRODUCT.

Expand  

You see: I am totally allowed to decompile my OWN scripts. I am just not allowed to decompile Autoit and the parts of it like the compiler or so!

 

And now let's talk about the forum:

  Quote

 Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects:

[...]

  • Decompilation of AutoIt scripts or details of decompiler software.
Expand  

My intention was not to start a topic about decompilation. That was all you guys could focus on ..
I also didn't post a link or asked for help with decompilation!

It was just a side note. I didn't expect you guys to take it so seriously ..?!

 

 

And now what? Am I the only one that thinks that this thread is now completly Offtopic? In other forums I am used to the method of "Offtopic is forbidden" ...

I was just asking if there's a way to disable the error functions. I now see that it is either not possible (a simple no would have been enough) or that yu guys just don't know about it ..

  • Moderators
Posted

@AutoBert asked and answered by a Mod - there is no reason for you to do nothing more than parrot what has already been said.

@Leo1906 I would highly suggest you check your attitude toward forum members who are trying to assist. I agree with others, who can't seem to wrap their minds around why you want to take the lazy route and "hide" error messages rather than coding correctly. It seems you are looking to this community to tell you it is okay to adopt bad coding processes, and I don't see that as something you're going to hear (and shame on the person who does tell you that).

It boils down to this:

  • Can you handle error and do proper error checking? Yep, spudw2k has already given you suggestions
  • Is anyone going to waste their time and effort helping you completely hide all errors, effectively making anything you code Crapware? Don't hold your breath :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted
  On 7/14/2016 at 11:24 PM, JLogan3o13 said:

 

@Leo1906 I would highly suggest you check your attitude toward forum members who are trying to assist. I agree with others, who can't seem to wrap their minds around why you want to take the lazy route and "hide" error messages rather than coding correctly. It seems you are looking to this community to tell you it is okay to adopt bad coding processes, and I don't see that as something you're going to hear (and shame on the person who does tell you that).

Expand  

I'm sorry. I didn't want to get rude to anybody. I wasn't expecting this when I started the thread ..
And as I stated 

  Quote

Well .. I don't want to start a discussion about the benefits of those messages.

Expand  

And I don't get it when people do exactly what I was NOT trying to achieve.

I like to apologize to the people I offended and thank those who actually wanted to help me :)

Posted

Some ideas why I would NOT suppress run-time error messages:

When a script crashes when used in prodcution those run time error messages are helpful.
Imagine you suppress all error messages debugging gets much more complex. Recreating the error means to know exactly what the user did (buttons pressed, data entered etc.).
Most of the time the answer you get is: "I did nothing wrong. Suddently the program crashed."

So error messages at least provide a starting point for debugging.

My UDFs and Tutorials:

  Reveal hidden contents

 

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
×
×
  • Create New...