-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sending cli error message in send events and fixing stdin bug (#1485)
* sending cli error message in send events and fixing stdin * fixing tests * addressing comments: refactoring code
- Loading branch information
Showing
3 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Error | ||
function throwError() { | ||
throw new Error('Some error'); | ||
} | ||
const args = process.argv.slice(2); // Extract command-line arguments, excluding the first two (node and script path) | ||
|
||
if (args.length > 0 && args[0].toLowerCase() === 'error') { | ||
throwError(); | ||
} |