> On 17 Oct 2019, at 17:39, dz <d...@bitzend.net> wrote:
> 
> The suggestion was to add a default  OnErr  state to the  script engine so 
> that it would provide the desired functionality to all programs,
> 
> This would mean that no additional code would be needed in any program to get 
> the default  "spam to me/user/everyone" behavior.
> I understand the event  handling is more 'elegant".   i just cant think of a 
> way to provide a default  event handler that won't conflict with the existing 
> codebase.

Oh, I think I'm starting to see why there's some confusion.

No additional code is required for default behaviour using an event handler; 
either the current state has the necessary event handler (in which case, it is 
called instead failing) or it doesn't (trigger default behaviour). Since the 
event handler doesn't currently exist, no existing script can possibly have 
one, so they will continue to use the default behaviour.

There's no need for hidden default error event handlers or anything of that 
sort; the script engine should know whether a script is capable of queuing an 
event (i.e- has the necessary handler in its current state), meanwhile the real 
change in behaviour is occurring within the OSSL functions themselves, not the 
scripts using them, so all changes can occur without affecting those at all (so 
they'll continue functioning as normal, and failing loudly on error).

> Ubit  has convinced me  that I have  wasted some hours of thought,  and 
> minutes of typing,  trying to be helpful. so i'm going to waste  a bit more.  
>  Apologies to the OP.

All ideas are welcome, I'm just trying to work through what the benefits of a 
state vs. an event might be to explore which is the better option. I mean, 
overall I would still prefer some kind of LSL try/catch block, but I'm less 
clear on what the difficulties for that are.

> As I read his post  what I hear is...
> *All your  NON LSL functions  are silly  and  not important…*

I don't think anyone is saying this? I love NPC features, does SL even have an 
equivalent to these yet? It's one of my favourite things about OpenSimulator.

The tricky part with that and other OSSL functions is that they're potentially 
dangerous (can crash your sim, overload the asset server etc.) functions if not 
carefully limited in who can use them, which is why the allow list exists so 
you can choose which function(s) to enable, and limit them.

> Sorry  to intrude  on your "thing" ubit...  but it is called
> OPENsimulator  for a reason,
> Go back and read  some of the "It's a Framework for EVERYONE" marketing
> goo...  Please.
> Then  go tell everyone  who uses  NPC's  to stop.,

I don't think anyone's telling people who use the functions to stop using them, 
you just have to be careful setting which ones you allow in your sim (and why), 
and recognise that because other sims will have set this differently then your 
scripts may not be portable at present.

The latter is part of the problem we're discussing, as being able to handle 
such errors means we could make NPC scripts and such that more gracefully 
handle failure.
_______________________________________________
Opensim-dev mailing list
Opensim-dev@opensimulator.org
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev

Reply via email to