On Fri, Jul 17, 2009 at 10:22 AM, Ron Jensen wrote:

> On Fri, 2009-07-17 at 10:10 -0500, Curtis Olson wrote:
> > This would be a good short term work around, but definitely I hope
> > Eric can look at the "generic" IO interface code and make sure it sets
> > the "create" flag to true on all the properties that are referenced so
> > they are created if they don't otherwise exist.
>
> Would this actually be desirable?  Right now the system balks if the
> property doesn't exist forcing an explicit declaration.  Setting the
> create flag would allow typos, for example, to slip through silently.
> It would also lull you into thinking you were logging an interesting
> property, when in fact, you're just logging dummies.
>

I suppose there are different philosophies of error handling, but having a
hard crash is not my personal favorite.

I like the idea of silently creating the property if it doesn't exist ...
that is the way so many of our other systems work.  If you have a nasal
script that writes some output value and a gauge that displays it, if there
is a typo in the gauge property, this will get created with zero or null
value.  Presumably a person would test their data logging before deploying
it and would investigate why one or more channels is reporting zero.

Perhaps another option would be to throw an exception if the property
doesn't exist, which would presumably be caught somewhere and an appropriate
message displayed.  but I really don't like it when user generated
configurations can produce hard segfault crashes with no error message other
than segfault or bus error.

Regards,

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to