Skip to content

Commit

Permalink
Allow throwing things other than errors within withBrowser (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby authored Jul 12, 2021
1 parent 63c0b61 commit 8619f64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/kind-trainers-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'pleasantest': minor
---

Allow throwing things other than errors within withBrowser
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export const withBrowser: WithBrowser = (...args: any[]) => {
}),
);
} else {
failureMessage.push(indent(error.message));
failureMessage.push(
indent(error instanceof Error ? error.message : String(error)),
);
}

await ctx.page.evaluate((...colorErr) => {
Expand Down

0 comments on commit 8619f64

Please sign in to comment.