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 = "<