You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For commandline applications, the exit code is used to communicate errors. Some applications might use more detailed exit codes than 0 for success and 1 for error.
If different error codes are used to signal different results (e.g. different kinds or errors, warnings etc), it would be useful if the generated commandline help would list the exit codes and their meaning.
To get the list of possible exit codes, the option classes would have to be annotated with additioal attributes. Because the attribute is not included in the CommandLineParser package, it would need to ship as a MdDocs.* package (possibly as source package to avoid adding having to ship the annotations with the application.
The annotation could look something like this:
[Verb("command")][ExitCode(0,"The command completed successfully")][ExitCode(1,"The command completed with warnings")][ExitCode(2,"Invalid arguments")][ExitCode(3,"Unspecified error")]classMyCommandOptions{//...}
For multi-command applications, the exit codes should be listed for every command as well as on the application main page (all exit codes of all commands)
The text was updated successfully, but these errors were encountered:
For commandline applications, the exit code is used to communicate errors. Some applications might use more detailed exit codes than 0 for success and 1 for error.
If different error codes are used to signal different results (e.g. different kinds or errors, warnings etc), it would be useful if the generated commandline help would list the exit codes and their meaning.
To get the list of possible exit codes, the option classes would have to be annotated with additioal attributes. Because the attribute is not included in the
CommandLineParser
package, it would need to ship as aMdDocs.*
package (possibly as source package to avoid adding having to ship the annotations with the application.The annotation could look something like this:
For multi-command applications, the exit codes should be listed for every command as well as on the application main page (all exit codes of all commands)
The text was updated successfully, but these errors were encountered: