Console apps in Windows can raise OSError (#15874)
Console apps in Windows implementation can raise OSError so I've fixed it, see below some examples for reference: -c07807bedf/lib/pure/terminal.nim (L170)-c07807bedf/lib/pure/terminal.nim (L178)-c07807bedf/lib/pure/terminal.nim (L191-L192)-c07807bedf/lib/pure/terminal.nim (L196-L197)- ...
This commit is contained in:
parent
203bddf307
commit
49f68122e6
1 changed files with 4 additions and 1 deletions
|
|
@ -37,7 +37,10 @@ type
|
|||
|
||||
var gTerm {.threadvar.}: owned(PTerminal)
|
||||
|
||||
proc newTerminal(): owned(PTerminal) {.gcsafe, raises: [].}
|
||||
when defined(windows) and defined(consoleapp):
|
||||
proc newTerminal(): owned(PTerminal) {.gcsafe, raises: [OSError].}
|
||||
else:
|
||||
proc newTerminal(): owned(PTerminal) {.gcsafe, raises: [].}
|
||||
|
||||
proc getTerminal(): PTerminal {.inline.} =
|
||||
if isNil(gTerm):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue