Skip to content

Commit

Permalink
feat(suite-common): Introduce UnreachableCaseError helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jbazant authored and vytick committed Jan 27, 2025
1 parent dc369c6 commit 7456dc6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions suite-common/suite-utils/src/UnreachableCaseError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export class UnreachableCaseError extends Error {
constructor(val: never, message = 'Unreachable case') {
super(`${message}: [${JSON.stringify(val)}]`);
}
}

0 comments on commit 7456dc6

Please sign in to comment.