mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 02:42:05 +00:00
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)- ... (cherry picked from commit49f68122e6)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user