[osg-submissions] fixed documentation & listed meanings for ReadResult errors in osgDB/ReaderWriter
Bob Kuehne
rpk at blue-newt.com
Tue Apr 29 10:48:17 PDT 2008
see cross-post to osg-users:
--
hi robert, osg community,
to amplify on what paul said:
* we do a lab in our course in which we explore what plugins are
capable of reading/writing.
* but! our results always show that plugins support an inconsistent
mix of return values,
sometimes returning "ERROR_IN_READING_FILE" when they really mean
that they don't handle
files of that extension, sometimes returning "FILE_NOT_HANDLED"
when there's an error in
reading the file data.
* as part of our course in paris this week, we've then wondered aloud
if there's an official
osg policy for these return values, and if robert had an original
design idea behind each
return value. our impression is that these mean, as follows:
FILE_NOT_HANDLED, //!< file is not appropriate for this file
reader, due to some incompatibility, but *not* a read error
FILE_NOT_FOUND, //!< file could not be found or could not be read
FILE_LOADED, //!< file successfully found, loaded, and converted
into osg
FILE_LOADED_FROM_CACHE, //!< file found in cache and returned
ERROR_IN_READING_FILE //!< file found, loaded, but an error was
encountered during processing
if this interpretation of the errors are correct, i'd like to add
doxygen documentation
to that effect, and the above comments can be in-line replaced in the
code to do so. and
i've sent a fixed osgDB/ReadResult to osg-submissions for this purpose.
the second thing i'd like to do, though i don't have the time, is to
clean up the loaders
so that the above return scheme is used consistently. the big problem
with the current
loaders is that there seems to not be a lot of consistency in error
reporting among all
loaders.
thoughts?
bob
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReaderWriter
Type: application/octet-stream
Size: 14369 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080429/cb95a479/attachment.obj
-------------- next part --------------
More information about the osg-submissions
mailing list