We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a853ad commit 5af80fbCopy full SHA for 5af80fb
packages/db/src/contracts.ts
@@ -32,10 +32,15 @@ const CONTRACTS_ENABLED =
32
*/
33
export class ContractViolationError extends Error {
34
constructor(
35
- public readonly violationType: `precondition` | `postcondition` | `invariant`,
+ public readonly violationType:
36
+ | `precondition`
37
+ | `postcondition`
38
+ | `invariant`,
39
message: string,
40
) {
- super(`${violationType.charAt(0).toUpperCase() + violationType.slice(1)} violation: ${message}`)
41
+ super(
42
+ `${violationType.charAt(0).toUpperCase() + violationType.slice(1)} violation: ${message}`,
43
+ )
44
this.name = `ContractViolationError`
45
}
46
0 commit comments