diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2018-09-06 03:12:10 -0700 |
---|---|---|
committer | Timothee Cour <timothee.cour2@gmail.com> | 2018-09-06 03:12:10 -0700 |
commit | 67aa8eab0b7f3c37c9c7936154ec567c8fdc1ec5 (patch) | |
tree | f53f5c4fb0bd819912e92a53898e958943b85561 /lib/pure/includes/oserr.nim | |
parent | 36e6ca16d1ece106d88fbb951b544b80c360d600 (diff) | |
download | Nim-67aa8eab0b7f3c37c9c7936154ec567c8fdc1ec5.tar.gz |
add data.sysCommand when startProcessAuxSpawn raises
Diffstat (limited to 'lib/pure/includes/oserr.nim')
-rw-r--r-- | lib/pure/includes/oserr.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/includes/oserr.nim b/lib/pure/includes/oserr.nim index 493e8e174..31212d0d1 100644 --- a/lib/pure/includes/oserr.nim +++ b/lib/pure/includes/oserr.nim @@ -57,10 +57,10 @@ proc raiseOSError*(errorCode: OSErrorCode; additionalInfo = "") {.noinline.} = ## the message ``unknown OS error`` will be used. var e: ref OSError; new(e) e.errorCode = errorCode.int32 - if additionalInfo.len == 0: - e.msg = osErrorMsg(errorCode) - else: - e.msg = osErrorMsg(errorCode) & "\nAdditional info: '" & additionalInfo & "'" + e.msg = osErrorMsg(errorCode) + if additionalInfo.len > 0: + e.msg.add "; Additional info: " + e.msg.addQuoted additionalInfo if e.msg == "": e.msg = "unknown OS error" raise e |