[Mono-list] File IO error
Nick Drochak
ndrochak@gol.com
Sun, 5 May 2002 00:30:26 +0900
RxDan,
I think you were the one working on the file IO bits, so I'll address
this to you. Anyone else who wants to fix it, please submit a patch to
the list.
I worked on StreamReader bugs a bit, and found some errors in how file
IO exceptions are thrown. Here's a simple test case that shows a
typical problem when the file cannot be found. An incorrect exception
is thrown: (btw, bugzilla is down right now so I'm sending to the list)
using System.IO;
using System;
namespace NS {
class C {
public static int Main() {
try {
FileStream f = new
FileStream("filenotthereforsure", FileMode.Open);
} catch (FileNotFoundException) {
return 0;
}
return 1;
}
}
}
Run this on mono on Linux, and you'll see the problem.
Good night,
Nick D.