Skip to content

Commit

Permalink
Address minor nits
Browse files Browse the repository at this point in the history
  • Loading branch information
BowTiedRadone authored and moodmosaic committed Feb 11, 2025
1 parent 9b8ada8 commit ab6a9fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ export const checkProperties = (
} catch (error: any) {
const displayedError =
error instanceof PropertyTestError
? error.errorCode
: error.includes("Runtime")
? error.clarityError
: error &&
typeof error === "string" &&
error.toLowerCase().includes("runtime")
? "(runtime)"
: "(unknown)";

Expand Down Expand Up @@ -487,9 +489,9 @@ export const isReturnTypeBoolean = (
) => discardFunctionInterface.outputs.type === "bool";

class PropertyTestError extends Error {
readonly errorCode: any;
constructor(message: string, errorCode: string) {
readonly clarityError: string;
constructor(message: string, clarityError: string) {
super(message);
this.errorCode = errorCode;
this.clarityError = clarityError;
}
}

0 comments on commit ab6a9fa

Please sign in to comment.