Skip to content

Commit

Permalink
Add more documentation about error.message
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Dec 15, 2019
1 parent 29a4737 commit 21c4339
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.d.ts
Expand Up @@ -336,7 +336,9 @@ declare namespace execa {
extends Error,
ExecaReturnBase<StdoutErrorType> {
/**
The error message.
Error message when the child process failed to run. In addition to the underlying error message, it also contains some information related to why the child process errored.
The child process stderr then stdout are appended to the end, separated with newlines and not interleaved.
*/
message: string;

Expand Down
10 changes: 9 additions & 1 deletion readme.md
Expand Up @@ -304,11 +304,19 @@ A human-friendly description of the signal that was used to terminate the proces

If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.

#### message

Type: `string`

Error message when the child process failed to run. In addition to the [underlying error message](#originalMessage), it also contains some information related to why the child process errored.

The child process [stderr](#stderr) then [stdout](#stdout) are appended to the end, separated with newlines and not interleaved.

#### shortMessage

Type: `string`

This is the same as the `message` property except it does not include the child process stdout/stderr.
This is the same as the [`message` property](#message) except it does not include the child process stdout/stderr.

#### originalMessage

Expand Down

0 comments on commit 21c4339

Please sign in to comment.