Skip to content

How to properly throw an error and exit with a specific exit code? #886

Answered by jmcdo29
tukusejssirs asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, you can access the commander instance (program in the above line) via @InjectCommander() and then use this.commander.error('Error message', options)

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@tukusejssirs
Comment options

@jmcdo29
Comment options

Answer selected by tukusejssirs
@jmcdo29
Comment options

@tukusejssirs
Comment options

@jmcdo29
Comment options

@tukusejssirs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants