Should merge suppress errors
Richard Gaskin
ambassador at fourthworld.com
Wed Sep 21 18:55:58 EDT 2016
Monte Goulding wrote:
>> On 22 Sep 2016, at 8:03 AM, Richard Gaskin wrote:
>>
>> Either way, seems worth exploring, either refining the behavior
>> or the token's documentation.
>
> I personally don’t see any harm in throwing a general merge
> evaluation error and it would be relatively easy to implement.
> It would be significantly more difficult to be specific about
> what the error was caused by or in your example throw the error
> on the line in the foo function.
Specificity would be helpful of course, but if that's too hard then even
knowing that an error occurred is better than not.
If there's a concern about people invested in letting merge run without
error notification perhaps it may be useful to consider limiting error
notification to try/catch blocks, where any error info is provided in
the catch, and when using outside of a try/catch block it just does what
it does now.
That said, it is somewhat odd that if an error is encountered in a merge
call that it prevents execution of later statements after the call, and
more importantly does so without notice.
Since it's been this way for so long I'm mystified that no one has found
that odd before, not even myself, but after discovering that today I can
conceive of many ways this can make debugging uncommonly difficult.
As an aside, I wonder how difficult it would be to have the explicit
merge function made more compatible with the implicit merge of LC
Server. Right now LC Server is a sort of island, with no way to run
code written for it in any environment with a debugger. If merge (or
some variant) was available with an option for processing things like
non-contiguous conditional blocks, we could probably have a smoother
workflow for crafting server solutions.
Probably not the highest ROI thing anyone should be working on today,
but maybe something to think about for another time....
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list