Recently, Roland Keller detected the problem that if a mandatory
attribute of some element has not been defined, it is difficult to
predict the behavior of a method that is supposed to access this
property. Lucian Smith suggested to throw an Exception in case of, e.g.,
calling getPerstistent() while the persistent attribute has not been set
for Trigger with SBML Level 3. This is also what is now implemented.
However, maybe we should better consider to move one step away from
libSBML here and change the signature of methods like this in the way
that the return value is not longer boolean but Boolean. In other cases
it might be usefull to have the return value Integer instead of int etc.
We could then simply return null for an undefined property instead of
throwing an unexpected runtime exception. What do users or other people
think should be done when trying to access an undefined attribute in
some SBML element?
Best wishes
Andreas
--
Dipl.-Bioinform. Andreas Dräger
University of Tuebingen
Center for Bioinformatics Tuebingen (ZBIT)
Sand 1
72076 Tübingen
Germany