Index: main.cpp =================================================================== diff -u -r53b262fea2d4b5bd78ff878fda0848f3737e7b74 -r52221d8d944edb5fbd57542960561830def8ffa9 --- main.cpp (.../main.cpp) (revision 53b262fea2d4b5bd78ff878fda0848f3737e7b74) +++ main.cpp (.../main.cpp) (revision 52221d8d944edb5fbd57542960561830def8ffa9) @@ -100,6 +100,7 @@ bool gEnableDryDemo = false ; QString gActiveCANBus = "can0"; +QString gParserErrorText = ""; /*! * \page CommandLineSwitches Denali Command Line Switches @@ -254,12 +255,12 @@ parser.addOption(optionActiveCANBus); // --- parse command lines + if ( ! parser.parse(qApp->arguments()) ) { + gParserErrorText = parser.errorText(); + return; + } + parser.process(*qApp); - parser.parse(qApp->arguments()); - - qDebug() << parser.unknownOptionNames(); - qDebug() << parser.optionNames(); - gConsoleoutCanInterface = parser.isSet(optionConsoleoutCanInterface ); gConsoleoutFrameInterface = parser.isSet(optionConsoleoutFrameInterface ); gConsoleoutLogs = parser.isSet(optionConsoleoutLogs ); @@ -421,6 +422,10 @@ " \n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); } + if ( ! gParserErrorText.isEmpty() ) { + LOG_DEBUG(QString("Command-line arguments process failed:") + gParserErrorText); + } + //! - Initializing the Device Controller _DeviceController.init(Threads::_DeviceController_Thread);