src/sys/private/errors

Source   Edit  

Procs

proc newOSError(errorCode: int32; additionalInfo = ""): ref OSError {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  

Templates

template initOSError(e: var OSError; errorCode: int32; additionalInfo = "")
Initializes an OSError object. This is a copy of stdlib's newOSError but perform in-place creation instead. Source   Edit  
template posixChk(op: untyped; errmsg: string = ""): untyped

Check whether the operation finished without error.

If an error occur, raiseOsError() will be called with errno and errmsg as arguments

Source   Edit