[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #9539] FileStream constructor throws incorrect e

From: Marcus Urban
Subject: [Pnet-developers] [bugs #9539] FileStream constructor throws incorrect exception
User-agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.21-144-athlon; X11; i686; en_US, en) (KHTML, like Gecko)

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.

[bugs #9539] Full Item Snapshot:

URL: <>
Project: DotGNU Portable.NET
Submitted by: Marcus Urban
On: Sat 07/03/2004 at 06:14

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Assigned to:  None
Status:  Open

Summary:  FileStream constructor throws incorrect exception

Original Submission:  According to the MSDN docs and testing with Rotor, when 
the FileStream constructor that takes a filename and mode is used, and the file 
is not found, a FileNotFoundException should be thrown. Pnet throws the more 
generic IOException ("operation not permitted"). IOException does not include 
information about the file that caused the error, so catching IOException does 
not permit a very descriptive error message.

The test case I'm attaching aborts with this error on Rotor:

Unhandled Exception: System.IO.FileNotFoundException: Could not find file 
File name: "/home/marcus/alpha/test-cases/DoesNotExist"
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, 
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean 
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at Testing.Main()

File Attachments

Date: Sat 07/03/2004 at 06:14  Name: filestream.cs  Size: 175B   By: mathpup
Test case;item_file_id=1454

For detailed info, follow this link:

  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]