[Opensim-dev] Improving LSL Script Error Handling

R.Gunther rigun at rigutech.nl
Mon Jan 20 21:11:27 UTC 2014


The debug window sounds great, because now you never can read the whole 
error report because the lsl error dialog dont handle line-wrap.

On 2014-01-20 20:57, Justin Clark-Casey wrote:
> Hi David.  That all sounds great to me.  As you've described, these 
> LSL errors should not be generating internal logged exceptions - the 
> information should be going out to the error/warning console as 
> happens on the LL grid.
>
> Time permitting, I'm very happy to review things as you go.  From my 
> perspective, the best approach is to isolate each logical change to an 
> individual patch (within reason) and put them on a Mantis entry.  
> Apologies if it sometimes takes me a while to get to them - time is 
> short at the moment and there are a bunch of other patches to look at 
> as well.
>
> Best,
>
> Justin
>
> On 18/01/14 22:48, David Rowe wrote:
>> Hi,
>>
>> I’ve been looking at script error handling in LSL_Api.cs and propose 
>> to tidy it up.
>>
>> Currently, LSL script errors are handled in a variety of ways:
>>
>> - llSay(0, "…"): Says error in public chat, whereas the error should 
>> be shouted on the debug channel (at least for all
>> the occurrences I’ve checked so far) and displayed in the Script 
>> Warning/Error dialogue box.
>>
>> - ShoutError("…"): Shouts errors on the debug channel (in accordance 
>> with the LSL documentation). But these errors are
>> not displayed in the viewer’s Script Warning/Error dialogue box.
>>
>> - LSLError("…"): throw new ScriptException("LSL Runtime Error: " + 
>> msg); Displays a .NET exception in both the viewer’s
>> Script Warning/Error dialogue box and the OpenSim console.
>>
>> - Deprecated("…"): throw new ScriptException("Command deprecated: " + 
>> command); Displays a .NET exception in both the
>> viewer’s Script Warning/Error dialogue box and the OpenSim console.
>>
>> - NotImplemented("…"): throw new NotImplementedException("Command not 
>> implemented: " + command); Displays a .NET
>> exception in both the viewer’s Script Warning/Error dialogue box and 
>> the OpenSim console.
>>
>> - throw new Exception(…): Displays a .NET exception in both the 
>> viewer’s Script Warning/Error dialogue box and the
>> OpenSim console.
>>
>> - throw new ScriptException(…): Displays a .NET exception script in 
>> both the viewer’s Script Warning/Error dialogue box
>> and the OpenSim console.
>>
>> What I propose to do is consolidate things down to use just three 
>> methods (that don’t produce .NET exceptions):
>>
>> - ShoutError()                    Shout the error details on the 
>> debug channel.
>>
>> - Deprecated()                  Shout "Command is deprecated" on the 
>> debug channel.
>>
>> - NotImplemented()      Shout "Command is not implemented" on the 
>> debug channel.
>>
>> And make all three also display the error in the viewer's Script 
>> Warning/Error dialogue box.
>>
>> Plus miscellaneous tidy ups such as …
>>
>> - Don’t included the LSL method’s name in errors shouted on the debug 
>> channel; the LSL method’s name is already included
>> in the “name” parameter of the message shouted.
>>
>> - Add Deprecated() calls to deprecated LSL methods that currently do 
>> nothing or just sleep with no user feedback.
>>
>> And replicate this approach in OSSL_Api.cs which has similar issues.
>>
>> If people think that this is a good idea, I’ll create a Mantis entry 
>> and proceed. Anyone interested in reviewing things
>> as I go?
>>
>> David
>>
>> SL/OSgrid: Strachan Ofarrel
>>
>>
>>
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>
>
>




More information about the Opensim-dev mailing list