From 67aa8eab0b7f3c37c9c7936154ec567c8fdc1ec5 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Thu, 6 Sep 2018 03:12:10 -0700 Subject: add data.sysCommand when startProcessAuxSpawn raises --- lib/pure/includes/oserr.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/pure/includes/oserr.nim') 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 -- cgit 1.4.1-2-gfad0