Skip to content

Commit

Permalink
fix(index): do not mask error code if unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Sep 23, 2023
1 parent aeb68c8 commit 70c4a11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const execFileAsync = promisify(execFile);

const errorMessages = {
3221225477: "Segmentation fault",
unk: "Unknown error",
};

/**
Expand Down Expand Up @@ -222,7 +221,10 @@ class UnRTF {
} else {
reject(
new Error(
code ? errorMessages[code] : errorMessages.unk
errorMessages[code] ||
`unrtf ${args.join(
" "
)} exited with code ${code}`
)
);
}
Expand Down

0 comments on commit 70c4a11

Please sign in to comment.