LCB/LCS errorDialog parameter

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

Post Reply
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3311
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US

LCB/LCS errorDialog parameter

Post by mwieder » Wed Oct 05, 2016 6:51 pm

The format of the errorDialog parameter for LCB and LCS is almost the same, but it's *so* different as to be incompatible.
Is there a reason for this?

I like the verbose LCB format except for a few missing items.
I'm more used to the format for LCS, but there's extra work involved in getting some of the information that's in the LCB format.

I'd really (really!) like to have a common format for both.

The LCB format looks like:

864,0,0,chunk index out of range

AFAICT there are unused items in the formats.
Item 1 is always an error number, which is an index into the executionerrors or the scriptparsingerrors.
Item 4 is a data item whose value depends on the value of item 1.
Items 2 and 3 seem to be unused.

The LCS format is more like:


Items 1 and 4 are as above: item 4 may or may not be present, depending on context
Item 2 is the line number of the error
Item 3 is the char number of the error line

I'd like to propose using (unused?) items 2 and 3 of the LCB error parameter for the same purpose as the LCS, i.e., line number and char number.
I'm not sure if it's possible to pick out the handler name from the LCB script, or if that even makes sense.

But having a more common format would allow more meaningful error reporting for LCB scripts without a lot of data mangling. This is currently not easily doable.

Post Reply

Return to “Engine Contributors”