Stop paramStr from always throwing an exception
This commit is contained in:
parent
0251c081f6
commit
89c2793fb5
1 changed files with 1 additions and 1 deletions
|
|
@ -1633,7 +1633,7 @@ elif not defined(createNimRtl):
|
||||||
|
|
||||||
proc paramStr*(i: int): TaintedString {.tags: [FReadIO].} =
|
proc paramStr*(i: int): TaintedString {.tags: [FReadIO].} =
|
||||||
# Docstring in nimdoc block.
|
# Docstring in nimdoc block.
|
||||||
if i < cmdCount and i >= 0: result = TaintedString($cmdLine[i])
|
if i < cmdCount and i >= 0: return TaintedString($cmdLine[i])
|
||||||
raise newException(EInvalidIndex, "invalid index")
|
raise newException(EInvalidIndex, "invalid index")
|
||||||
|
|
||||||
proc paramCount*(): int {.tags: [FReadIO].} =
|
proc paramCount*(): int {.tags: [FReadIO].} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue