Hi Jannik,

I like the approach and have merged the changes with the change of
method name from describe() to statusMessage(), I did this as I felt
the later name better encapsulates the functionality that it wraps up.
Changes merged and checked into master.

Cheers,
Robert.

On 21 November 2015 at 02:32, Jannik Heller <[email protected]> wrote:
> Hi Robert,
>
> This submission improves the logging of error messages for osgDB::ReadResult 
> and osgDB::WriteResult. Added is a new describe() method that returns a 
> description of the status code as well as the concrete error message if there 
> is one. The osgDB::read<Object>File and write<Object>File methods were ported 
> over to this new error printing method.
>
> The motivation for this change is that most ReaderWriter's only set the 
> status code and not the _message so the previous method of just writing the 
> message is almost useless - for many errors users are left in the dark on 
> what has actually gone wrong.
>
> There was a partial attempt in Registry::readNodeFunctor to translate status 
> codes to a message - but this wasn't implemented for all status codes and 
> there were redundant copies of this code all over the place. The other 
> problem is that doing the status -> message tanslation in that place won't 
> work if you directly call the ReaderWriter rather than going through a 
> Registry::read* function (as is done in many places in the osg). So I went 
> ahead and removed this half-baked earlier solution.
>
> Thank you!
>
> Cheers,
> Jannik
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65716#65716
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to