Skip to content

gdk_pixbuf throwing inaccurate exceptions  #118

@CromFr

Description

@CromFr

https://github.com/gtkd-developers/GtkD/blob/master/src/gdkpixbuf/Pixbuf.d#L344
Should be more like:

public this(string filename)
{
    GError* err = null;
    auto p = gdk_pixbuf_new_from_file(Str.toStringz(filename), &err);
    if(p is null)
    {
        if (err !is null)
        {
            throw new GException( new ErrorG(err) );
        }
        throw new ConstructionException("null returned by new_from_file");
    }
    this(cast(GdkPixbuf*) p, true);
}

The same issue happens in other parts of the same file, maybe also in other files.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions