feat: add {.raises.} annotations

Co-Authored-By: Dmitriy Ryajov <dryajov@gmail.com>
This commit is contained in:
Mark Spanbroek 2025-07-02 16:29:16 +02:00
parent 8dd99f1964
commit a162bb8728
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,8 @@ proc readSection[T] ( expectedMagic: string
, stream: Stream
, user: var T
, callback: SectionCallback[T]
, filt: (int) -> bool ) =
, filt: proc(_: int): bool {.raises: [IOError, OSError].}
) {.raises: [IOError, OSError].} =
let sectId = int( stream.readUint32() )
let sectLen = int( stream.readUint64() )
@ -77,7 +78,8 @@ proc parseContainer*[T] ( expectedMagic: string
, fname: string
, user: var T
, callback: SectionCallback[T]
, filt: (int) -> bool ) =
, filt: proc(_: int): bool {.raises: [IOError, OSError].}
) {.raises: [IOError, OSError].} =
let stream = newFileStream(fname, mode = fmRead)
defer: stream.close()

View File

@ -7,6 +7,8 @@
# See <https://geometry.xyz/notebook/the-hidden-little-secret-in-snarkjs>
#
{.push raises:[].}
#[
import sugar
import constantine/math/config/curves