RELEASE LiveCode 6.6 DP1

Björnke von Gierke bvg at mac.com
Thu Feb 20 07:08:38 EST 2014


On 16.02.2014, at 22:13, Peter Haworth <pete at lcsql.com> wrote:

>  Seems like it's really meant to detect the
> infamous "this should never happen" situation rather than expected errors.,

Alright, if that is the case, why isn't it done in the engine WITHOUT adding another command? why do WE need to add random commands to our code? Wouldn't some message or global property that changes the behaviour of bug-detection that the engine already has to do anyway be better? In fact, it is my impression THAT ALREADY EXISTS!

Maybe I still don't understand the way this command works, but I guess this is what it should be doing as far as I see from the discussion:

1. The developer doesn't know wether the code he's writing works or not (due to whatever reason)
2. He has to anticipate that, and put asserts all over his script in semi random places, inflating the codesize and reducing readability
3. He handles the assertMessage message and produces error handling code there.

Now compare this to what already is possible:

1. An unexpected error occurs (like: 1 + "text")
2. use the errorDialog message to handle it, and produce error handling code there

I really don't see how the assert command is improving anything, but as I said, I don't understand what it does. So what is possible with assert that isn't already done better with existing capabilities, and if that's the case, why is the assert command a better addition then modifying the existing capabilities.

For reference here's what i found in regards to handling unexpected bugs like 1 + "text":

errorDialog message
executionContexts property
scriptExecutionError message
lockErrorDialogs property (not sure what this is supposed to do, isn't the error dialog IDE-specific? Also the documentation is wrong or weirdly worded about errorDialog messages not being sent when it's false)

other:

errorMode property (only server)
scriptParsingError message (probably wrong kind of error?)
stdErr

-- 

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/






More information about the use-livecode mailing list