Skip to content

Commit

Permalink
fix: addtl try
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <jaamorris@cs.stonybrook.edu>
  • Loading branch information
james-a-morris committed Nov 22, 2024
1 parent 79b1840 commit 7630ccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/error-handling/src/utils/assert.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assertBase from "assert";
import * as assertModule from "assert";
import { AssertError } from "../errors/AssertError";

/**
Expand All @@ -10,7 +10,7 @@ import { AssertError } from "../errors/AssertError";
*/
export function assert(value: unknown, message: string): asserts value {
try {
return assertBase(value, message);
return assertModule.ok(value, message);
} catch (e: unknown) {
throw new AssertError(message);
}
Expand Down

0 comments on commit 7630ccd

Please sign in to comment.