mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 14:32:53 +00:00
replace some runtime repr in stdlib for gc:arc (#12716)
This commit is contained in:
committed by
Andreas Rumpf
parent
8debf79837
commit
bd8f49cbd3
@@ -190,8 +190,8 @@ proc decode*(s: string): string =
|
||||
inc inputIndex
|
||||
if x == invalidChar:
|
||||
raise newException(ValueError,
|
||||
"Invalid base64 format character " & repr(s[inputIndex]) &
|
||||
" at location " & $inputIndex & ".")
|
||||
"Invalid base64 format character `" & s[inputIndex] &
|
||||
"` (ord " & $s[inputIndex].ord & ") at location " & $inputIndex & ".")
|
||||
|
||||
template outputChar(x: untyped) =
|
||||
result[outputIndex] = char(x and 255)
|
||||
|
||||
@@ -747,7 +747,7 @@ proc parseResponse(client: HttpClient | AsyncHttpClient,
|
||||
# Parse HTTP version info and status code.
|
||||
var le = skipIgnoreCase(line, "HTTP/", linei)
|
||||
if le <= 0:
|
||||
httpError("invalid http version, " & line.repr)
|
||||
httpError("invalid http version, `" & line & "`")
|
||||
inc(linei, le)
|
||||
le = skipIgnoreCase(line, "1.1", linei)
|
||||
if le > 0: result.version = "1.1"
|
||||
|
||||
@@ -1206,7 +1206,8 @@ proc parseHexStr*(s: string): string {.noSideEffect, procvar,
|
||||
for pos, c in s:
|
||||
let val = hexCharToValueMap[ord(c)].ord
|
||||
if val == 17:
|
||||
raise newException(ValueError, "Invalid hex char " & repr(c))
|
||||
raise newException(ValueError, "Invalid hex char `" &
|
||||
c & "` (ord " & $c.ord & ")")
|
||||
if pos mod 2 == 0:
|
||||
buf = val
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user