Refines raises list in osproc (#21323)

* Remove Exception from raises in closeImpl

* Update osproc.nim

* refine errors

* add ValueError

* cast raises

* refactor raises lists

* Update lib/pure/osproc.nim

* Update lib/pure/osproc.nim

---------

Co-authored-by: Antonis Geralis <43617260+planetis-m@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
ringabout 2023-02-14 20:11:14 +08:00 • committed by GitHub
commit 56a4d246a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 22 deletions

View file

@ -115,7 +115,7 @@ type
## * That these fields here shouldn't be used directly.
## They are accessible so that a stream implementation can override them.
closeImpl*: proc (s: Stream)
{.nimcall, raises: [Exception, IOError, OSError], tags: [WriteIOEffect], gcsafe.}
{.nimcall, raises: [IOError, OSError], tags: [WriteIOEffect], gcsafe.}
atEndImpl*: proc (s: Stream): bool
{.nimcall, raises: [Defect, IOError, OSError], tags: [], gcsafe.}
setPositionImpl*: proc (s: Stream, pos: int)