https://bugzilla.novell.com/show_bug.cgi?id=388198


           Summary: System.Drawing.Image.Save() throws "A generic error
                    occured in GDI+" when the path is invalid or
                    inaccessible
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: Development


Description of Problem:

On both .NET and Mono System.Drawing.Image.Save() throws
an Exception with the message "A generic error occured in GDI+" when
the specified path is either invalid or inaccessible (due to access rights).



Steps to reproduce the problem:

//Make sure the specified path does not exist or is inaccessible
System.Drawing.Image image = new System.Drawing.Bitmap(100,100);
image.Save("c:\\test\\file.jpg");



Actual Results:

System.Runtime.InteropServices.ExternalException: A generic error occured in
GDI+

Expected Results:

A more specific exception stating the specified path is invalid or inaccessible

How often does this happen? 

Whenever you execute this code

Additional Information:

Behaves the exact same way in .NET, they don't throw a meaningful exception
either.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to