[Mono-bugs] [Bug 388198] New: System.Drawing.Image.Save() throws " A generic error occured in GDI+" when the path is invalid or inaccessible

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 8 09:00:46 EDT 2008


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: mono-bugs at lists.ximian.com
        ReportedBy: timothy at saneprojects.be
         QAContact: mono-bugs at lists.ximian.com
          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.


More information about the mono-bugs mailing list