From 871d9c923747def6b0b24905654ead6afc0c2110 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 25 Nov 2003 11:05:22 +0000 Subject: [PATCH] Moved the unrecognized options check to after loaded --- examples/osgviewer/osgviewer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/osgviewer/osgviewer.cpp b/examples/osgviewer/osgviewer.cpp index 59ae93472..29dbcf2df 100644 --- a/examples/osgviewer/osgviewer.cpp +++ b/examples/osgviewer/osgviewer.cpp @@ -42,9 +42,6 @@ int main( int argc, char **argv ) return 1; } - // any option left unread are converted into errors to write out later. - arguments.reportRemainingOptionsAsUnrecognized(); - // report any errors if they have occured when parsing the program aguments. if (arguments.errors()) { @@ -71,6 +68,15 @@ int main( int argc, char **argv ) return 1; } + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + } + osg::Timer_t end_tick = timer.tick(); std::cout << "Time to load = "<