summaryrefslogtreecommitdiff
path: root/indra/newview/llcommandlineparser.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-17 02:56:14 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-17 02:56:14 +0000
commita3f3ab7e113e44309461b26399d627814f0ce4f9 (patch)
tree695b2a41f8d31330634ef59e7d6ece526242fd86 /indra/newview/llcommandlineparser.cpp
parentd85247e63e5ff0b488211b62429a4895b48dee27 (diff)
QAR-449 Viewer 1.20 RC 1
merge Branch_1-20-Viewer -r 84432 : 84760 -> release
Diffstat (limited to 'indra/newview/llcommandlineparser.cpp')
-rw-r--r--indra/newview/llcommandlineparser.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 2f99ca1247..a6e002a04d 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -261,7 +261,7 @@ void LLCommandLineParser::addOptionDesc(const LLString& option_name,
}
}
-bool parseAndStoreResults(po::command_line_parser& clp)
+bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp)
{
try
{
@@ -269,24 +269,32 @@ bool parseAndStoreResults(po::command_line_parser& clp)
clp.positional(gPositionalOptions);
clp.style(po::command_line_style::default_style
| po::command_line_style::allow_long_disguise);
+ if(mExtraParser)
+ {
+ clp.extra_parser(mExtraParser);
+ }
+
po::basic_parsed_options<char> opts = clp.run();
po::store(opts, gVariableMap);
}
catch(po::error& e)
{
llwarns << "Caught Error:" << e.what() << llendl;
+ mErrorMsg = e.what();
return false;
}
catch(LLCLPError& e)
{
llwarns << "Caught Error:" << e.what() << llendl;
+ mErrorMsg = e.what();
return false;
}
catch(LLCLPLastOption&)
{
// Continue without parsing.
- llwarns << "Found tokens past last option. Ignoring." << llendl;
-
+ std::string msg = "Found tokens past last option. Ignoring.";
+ llwarns << msg << llendl;
+ mErrorMsg = msg;
// boost::po will have stored a mal-formed option.
// All such options will be removed below.
for(po::variables_map::iterator i = gVariableMap.begin(); i != gVariableMap.end();)