Remove line breaks in OSError messages (Windows)

Before:
```
Error: unhandled exception: Не удается найти указанный файл.
 [OSError]
```
After:
```
Error: unhandled exception: Не удается найти указанный файл.  [OSError]
```
This commit is contained in:
Vladislav Vorobiev
2016-07-01 21:50:26 +03:00
committed by GitHub
parent d8ee2c2409
commit e4b16ac608

View File

@@ -66,13 +66,13 @@ proc osErrorMsg*(): string {.rtl, extern: "nos$1", deprecated.} =
if err != 0'i32:
when useWinUnicode:
var msgbuf: WideCString
if formatMessageW(0x00000100 or 0x00001000 or 0x00000200,
if formatMessageW(0x00000100 or 0x00001000 or 0x00000200 or 0x000000FF,
nil, err, 0, addr(msgbuf), 0, nil) != 0'i32:
result = $msgbuf
if msgbuf != nil: localFree(cast[pointer](msgbuf))
else:
var msgbuf: cstring
if formatMessageA(0x00000100 or 0x00001000 or 0x00000200,
if formatMessageA(0x00000100 or 0x00001000 or 0x00000200 or 0x000000FF,
nil, err, 0, addr(msgbuf), 0, nil) != 0'i32:
result = $msgbuf
if msgbuf != nil: localFree(msgbuf)