mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 11:49:39 -04:00
moved exit from CmdLine to StdOutput to provide users more control over when/how the exit happens
This commit is contained in:
parent
3718682c6d
commit
6b2cb3ab1d
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -148,6 +148,7 @@ inline void StdOutput::failure( CmdLineInterface& _cmd,
|
||||
else
|
||||
usage(_cmd);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
inline void StdOutput::_shortUsage( CmdLineInterface& _cmd,
|
||||
|
Loading…
x
Reference in New Issue
Block a user