LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I'm using try/catch to detect some errors. This structure return some error numbers but I cannot "decode" them.
Please can you give me a reference to read them?
what you see are the hints rom the ERRORDIALOG, check the dictionary for more info.
...
The executionError parameter is a standard LiveCode error backtrace in the form:
<error-code>,<line-number>,<column-number>[,<hint>]
...
what you see are the hints rom the ERRORDIALOG, check the dictionary for more info.
...
The executionError parameter is a standard LiveCode error backtrace in the form:
<error-code>,<line-number>,<column-number>[,<hint>]
...
Best
Klaus
Great thank you!
But the problem is not yet solved since, reading the documentation and making tests, error codes are stored inside revErrorDisplay, and that stack is available only when using the IDE (so I cannot get info during runtime
It is crazy that I cannot include that stack while I distribute my application.
Any workaround?
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki
FourthWorld wrote: Fri May 26, 2023 2:52 pm
It seems weird to me that there isn't a documented function for looking up the error string from the error code number.
It's in the entry for errorDialog in the dictionary.
@klaus Richard and I co-wrote the error lookup stack. It's also available in the LC user examples online.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
FourthWorld wrote: Fri May 26, 2023 2:52 pm
It seems weird to me that there isn't a documented function for looking up the error string from the error code number.
It's in the entry for errorDialog in the dictionary.
Thank you. I'd forgotten about the scriptExecutionErrors.
That these sorts of questions keep coming up several times a year suggests a rethink on error handling may be helpful. ErrorDialog is used in many contexts unrelated to even potentially showing a dialog window, and there are opportunities to streamline decoding the error data, as well as making error handling more consistent than the current collection of sometimes rules (sometimes we check errorDialog, sometimes we need to use sysError, sometimes we check the result, sometimes we need to structure our code specifically for error handling using try/catch...).
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
I've just noticed that scriptExecutionErrors returns empty in standalones, further reducing it's value...
You'd need to duplicate scriptExecutionErrors in your stack if you wanted to provide proper feedback on errors in a standalone. Not any degree of difficult, but why the extra step?
stam wrote: Fri May 26, 2023 7:56 pm
I've just noticed that scriptExecutionErrors returns empty in standalones, further reducing it's value...
You'd need to duplicate scriptExecutionErrors in your stack if you wanted to provide proper feedback on errors in a standalone. Not any degree of difficult, but why the extra step?
Maybe because there is no debugger included in standalones.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
stam wrote: Fri May 26, 2023 7:56 pm
I've just noticed that scriptExecutionErrors returns empty in standalones, further reducing it's value...
You'd need to duplicate scriptExecutionErrors in your stack if you wanted to provide proper feedback on errors in a standalone. Not any degree of difficult, but why the extra step?
Maybe because there is no debugger included in standalones.
Do you need a debugger to get the error codes? I ask because the standalone settings have a 'bug reports' section which I presume relates to LC error codes being generated. How else would this be triggered? And I haven't checked but had assumed the error numbers returned would do so in standalones as well, or is this also not the case?
(Also - Richard elegantly showed a debugger that can be included in a standalone...)
The scriptExecutionErrors seems to be an IDE thing. If you want to catch all errors, not just the ones that LC reports in standalones (i.e., catch silent errors) you can use an errorDialog handler. That's what I usually do.
jacque wrote: Fri May 26, 2023 8:17 pm
The scriptExecutionErrors seems to be an IDE thing. If you want to catch all errors, not just the ones that LC reports in standalones (i.e., catch silent errors) you can use an errorDialog handler. That's what I usually do.
Errrrmmm... now I'm confused.
Dictionary on scriptExecutionErrors wrote:Reports a list of all possible LiveCode script execution errors.
It's just a return-delimited list of LC errors, whose line number corresponds to the error number. In itself it catches nothing, it's just a a verbose dictionary. So why should it not be in standalones
Also - when the time time I included this in a standalone for distribution, it kept firing with either numbers or nothing and was always non-fatal - users just dismissed it and I just shrugged my shoulders