LC error messages
Richard Gaskin
ambassador at fourthworld.com
Mon Jun 20 09:42:20 EDT 2011
J. Landman Gay wrote:
> On 6/19/11 10:21 PM, Slava Paperno wrote:
>> Where are the LC error messages listed, please?
>
> See "errordialog" in the dictionary, where it says:
> ***
> Comments:
> Standard error descriptions are stored in the cErrorsList of the first
> card of stack "revErrorDisplay". The error-code refers to the line
> number in this custom property which contains the error description.
>
> You can look up the description of an error using this line of code:
>
> answer line (item 1 of line 1 of pExecutionError) of the cErrorsList of
> card 1 of stack "revErrorDisplay"
> ***
>
> I saved the list as a text file for reference. If you have a working web
> plugin, you can also look them up on my web page:
>
> <http://jacque.on-rev.com/codebits/dualrevlets.irev>
As valuable as that is, ideally it should never been needed:
In the IDE, execution error should be picked up by the IDE's errorDialog
handler for a user-friendly presentation. Whenever that doesn't happen
it's a bug and requires a bug report to be submitted against it.
For standalones, the IDE provides an option for including an execution
error dialog (see the Errors tab of the Standalone Builder). I don't
know why this is turned off by default (I see at least one post here and
in the forums each month looking for error info, suggesting folks aren't
using the provided error dialog), since without it your app will have no
way to let you know when something goes wrong. But until they turn it
on by default, it's easy enough to just click the checkbox provided
there to include it.
You can also roll your own error dialog pretty much like RunRev did, as
a library stack which traps the errorDialog message. If you decide to
roll your own remember that error strings can change between versions,
so you'll want to update your list of error strings from the IDE stack
property Jacque mentioned with each new release.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
More information about the use-livecode
mailing list