HI Michael, On 12 June 2012 07:59, michael kapelko <[email protected]> wrote: > I see that OSG does not use exceptions, instead it only notifies of > errors.
The majority of the OSG doesn't use exception. It used to use more but I did a purge of use of exceptions in the core OSG to avoid problems with embedded platforms that didn't support exceptions properly. The main place that exceptions remain in use is some of the plugins which won't be compliable on platforms without exceptions. > Does it mean, that OSG encourages return-code error handling? The error states returned from function/method calls tend to be very specific to the task in hand, much of the OSG will assume no error and have no error handling/return codes, things like memory errors will get passed back via the standard C++ exceptions. Case like file loading will have specific mechanism for giving feedback on errors. > Currently I use exceptions (which are only thrown if application > cannot continue normal operation: invalid resource, invalid input > parameter, etc) and would like to continue to use them, but since > large part of my program (OSG) won't be using exceptions any more > (I've used OGRE before), I wonder if using exceptions is suitable at > all now. There is nothing wrong with using exceptions with the OSG in your application. The only limit would be if you want to target specific embedded platforms that don't support exceptions. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

