diff options
Diffstat (limited to 'lib/pure/os.nim')
-rw-r--r-- | lib/pure/os.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index d6f6aca5f..da84df791 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -2678,7 +2678,7 @@ when defined(nimdoc): proc paramStr*(i: int): TaintedString {.tags: [ReadIOEffect].} = ## Returns the `i`-th `command line argument`:idx: given to the application. ## - ## `i` should be in the range `1..paramCount()`, the `IndexError` + ## `i` should be in the range `1..paramCount()`, the `IndexDefect` ## exception will be raised for invalid values. Instead of iterating over ## `paramCount() <#paramCount>`_ with this proc you can call the ## convenience `commandLineParams() <#commandLineParams>`_. @@ -2754,7 +2754,7 @@ elif defined(windows): ownArgv = parseCmdLine($getCommandLine()) ownParsedArgv = true if i < ownArgv.len and i >= 0: return TaintedString(ownArgv[i]) - raise newException(IndexError, formatErrorIndexBound(i, ownArgv.len-1)) + raise newException(IndexDefect, formatErrorIndexBound(i, ownArgv.len-1)) elif defined(genode): proc paramStr*(i: int): TaintedString = @@ -2773,7 +2773,7 @@ elif not defined(createNimRtl) and proc paramStr*(i: int): TaintedString {.tags: [ReadIOEffect].} = # Docstring in nimdoc block. if i < cmdCount and i >= 0: return TaintedString($cmdLine[i]) - raise newException(IndexError, formatErrorIndexBound(i, cmdCount-1)) + raise newException(IndexDefect, formatErrorIndexBound(i, cmdCount-1)) proc paramCount*(): int {.tags: [ReadIOEffect].} = # Docstring in nimdoc block. |