Skip to content

Commit

Permalink
fixup(js): n_math.math_is_error not compile on JS
Browse files Browse the repository at this point in the history
  • Loading branch information
litlighilit committed Sep 26, 2024
1 parent b5ed21e commit bc21598
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pylib/Lib/n_math.nim
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ when CLike:
proc c_strerror(code: cint): cstring{.importc: "strerror", header: "<string.h>".}
func errnoMsg(errnoCode: cint): string = $c_strerror(errnoCode)
elif defined(js):
func errnoMsg(errnoCode: cint): string{.warning: "not impl, see how math_patch set error".} = ""
func errnoMsg(errnoCode: cint): string =
doAssert false, "unreachable (see errnoUtils.Errno enum shall be count out)"

func math_is_error*(x: SomeFloat, exc: var ref Exception): bool{.exportc.} =
##[ inner usage (used by Lib/math).
Expand Down

0 comments on commit bc21598

Please sign in to comment.