Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Futureproof error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
brawaru committed Feb 16, 2024
1 parent cf97109 commit 9c3aa01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ export const plugin = createUnplugin<Options_, false>((options_, meta) => {
try {
await resolveFormatter()
} catch (err) {
this.error(err)
if (err instanceof Error) {
this.error(err)
} else {
this.error(String(err))
}
}
}

Expand Down

0 comments on commit 9c3aa01

Please sign in to comment.