Bug 1178 - In core, CommandLine::HandleArgument function called exit
In core, CommandLine::HandleArgument function called exit
Status: RESOLVED INVALID
Product: ns-3
Classification: Unclassified
Component: core
pre-release
All All
: P5 normal
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-31 08:54 UTC by YunQiang Su
Modified: 2011-07-06 19:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YunQiang Su 2011-05-31 08:54:17 UTC
I believe we should not call exit() in an libraries.

This function should only return an error code to the caller, but not exit rude.
Comment 1 Mathieu Lacage 2011-07-06 19:08:06 UTC
I understand the rationale behind this bug report but the code was purposedly made to do this to save the user from having to type extra checking code (which no user would ever write anyway). You might also consider the fact that ns-3 does a lot of checks that end up as fatal assertions at runtime for errors which could be recoverable but which we decided to not recover from to simplify the code and to help users catch their errors early.