dotgnu-pnet
[Top][All Lists]
Advanced

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

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


From: Thong Nguyen
Subject: [Pnet-developers] [bugs #9539] FileStream constructor throws incorrect exception
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)

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

/**************************************************************************/
[bugs #9539] Latest Modifications:

Changes by: 
                Thong Nguyen <address@hidden>
'Date: 
                Wed 08/25/2004 at 06:32 (NZ)

            What     | Removed                   | Added
---------------------------------------------------------------------------
              Status | Open                      | Closed







/**************************************************************************/
[bugs #9539] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9539>
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:  Fixed
Privacy:  Public
Assigned to:  tum
Status:  Closed


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 
"/home/marcus/alpha/test-cases/DoesNotExist".
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 
bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at Testing.Main()


Follow-up Comments
------------------


-------------------------------------------------------
Date: Mon 08/23/2004 at 12:44       By: Thong Nguyen <tum>
fixed in cvs

-------------------------------------------------------
Date: Sun 07/18/2004 at 14:13       By: Deryk Robosson <drobosson>
FileStream is not the culprit here from what I can tell.  It handles the ENOENT 
errno and deals with the directory and file not found exceptions.  I've only 
been able to trace back as far as pnet/support/file.c:ILSysIOOpenFile, both 
functions, the first seams to only set EACCES, and the second ENOENT (perhaps 
someone can explain to me why there are two..)






File Attachments
-------------------

-------------------------------------------------------
Date: Sat 07/03/2004 at 06:14  Name: filestream.cs  Size: 175B   By: mathpup
Test case
http://savannah.gnu.org/bugs/download.php?item_id=9539&amp;item_file_id=1454






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9539>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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