cli.js
function handleCommandError(ex) {
    // If the command throws an exception, display the error message and command help.
    if (ex instanceof Error) {
        console.log(chalk.red(ex.message));
    } else {
        console.log(chalk.red(ex));
    }
    console.log();
    const helpArgs = {
        _: [command]
    };
    helpCommand(helpArgs);
}
function handleCommandError(ex) {
    // If the command throws an exception, display the error message and command help.
    if (ex instanceof Error) {
        console.log(chalk.red(ex.message));
    } else {
        console.log(chalk.red(ex));
    }
    console.log();
    const helpArgs = {
        _: [command]
    };
    helpCommand(helpArgs);
}
function handleCommandError ( ex ) { // If the command throws an exception, display the error message and command help. if ( ex instanceof Error ) { console . log ( chalk . red ( ex . message ) ) ; } else { console . log ( chalk . red ( ex ) ) ; } console . log ( ) ; const helpArgs = { _ : [ command ] } ; helpCommand ( helpArgs ) ; }
If the command throws an exception, display the error message and command help
@param {*} ex The thrown exception
If the command throws an exception display the error message and command help