EIO is called IOError now

This commit is contained in:
Araq 2016-09-25 08:51:30 +02:00
commit b8325181d1

View file

@ -359,7 +359,7 @@ proc parallelReplace*(s: string, subs: openArray[
proc transformFile*(infile, outfile: string, proc transformFile*(infile, outfile: string,
subs: openArray[tuple[pattern: Regex, repl: string]]) = subs: openArray[tuple[pattern: Regex, repl: string]]) =
## reads in the file `infile`, performs a parallel replacement (calls ## reads in the file `infile`, performs a parallel replacement (calls
## `parallelReplace`) and writes back to `outfile`. Raises ``EIO`` if an ## `parallelReplace`) and writes back to `outfile`. Raises ``IOError`` if an
## error occurs. This is supposed to be used for quick scripting. ## error occurs. This is supposed to be used for quick scripting.
var x = readFile(infile).string var x = readFile(infile).string
writeFile(outfile, x.parallelReplace(subs)) writeFile(outfile, x.parallelReplace(subs))