moved exit from CmdLine to StdOutput to provide users more control over when/how the exit happens

This commit is contained in:
mes5k 2006-11-26 18:32:04 +00:00
parent 3718682c6d
commit 6b2cb3ab1d
3 changed files with 3 additions and 1 deletions

View File

@ -418,7 +418,7 @@ inline void CmdLine::parse(int argc, char** argv)
if ( requiredCount > _numRequired )
throw(CmdLineParseException("Too many arguments!"));
} catch ( ArgException& e ) { _output->failure(*this,e); exit(1); }
} catch ( ArgException& e ) { _output->failure(*this,e); }
}
inline bool CmdLine::_emptyCombined(const std::string& s)

View File

@ -192,6 +192,7 @@ inline void DocBookOutput::failure( CmdLineInterface& _cmd,
ArgException& e )
{
std::cout << e.what() << std::endl;
exit(1);
}
inline void DocBookOutput::substituteSpecialChars( std::string& s,

View File

@ -148,6 +148,7 @@ inline void StdOutput::failure( CmdLineInterface& _cmd,
else
usage(_cmd);
exit(1);
}
inline void StdOutput::_shortUsage( CmdLineInterface& _cmd,