# Closing a GdkPixbufLoader ignoring errors

**URL:** <https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369>\
**Category:** Ruby-Gnome 2\
**Created:** [March 31, 2008, 12:14am UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369 "2008-03-31T00:14:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 12:14am UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/1 "2008-03-31T00:14:00Z")

</div>

Quoting  
[http://library.gnome.org/devel/gdk-pixbuf/unstable/GdkPixbufLoader.html#gdk-pixbuf-loader-close](http://library.gnome.org/devel/gdk-pixbuf/unstable/GdkPixbufLoader.html#gdk-pixbuf-loader-close)  
:

“If you’re just cancelling a load rather than expecting it to be  
finished, passing NULL for error to ignore it is reasonable.”

Current implementation doesn’t allow for it:

-=----=----=----=----=----=----=—  
static VALUE  
loader\_close(self)  
VALUE self;  
{  
GError \*error = NULL;  
gboolean res;

```
res = gdk_pixbuf_loader_close(_SELF(self), &error);
if(error)
    RAISE_GERROR(error);

return CBOOL2RVAL(res);

```

}  
-=----=----=----=----=----=----=—

What is the correct rg2 idiom for doing that? Using #close(nil) sounds  
pretty stupid, but then, what to do? Maybe #close\_noerror but then the  
principle of least surprise (guessing method names and ways to call  
them) is pretty broken 😕

–  
Guillaume C. - [http://zarb.org/~gc/](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/2 "2008-03-31T17:29:55Z")

</div>

> end  
> makes sense!

I wanted to update the hiki documentation accordingly, but the  
“generic” username/password I was previously using doesn’t seem to  
work anymore (login “ruby-gnome2…”).

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/3 "2008-03-31T17:11:34Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] closing a GdkPixbufLoader ignoring errors” on  
Mon, 31 Mar 2008 00:13:16 +0200,  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> loader\_close(self)  
> }  
> -=----=----=----=----=----=----=—
> 
> What is the correct rg2 idiom for doing that? Using #close(nil) sounds  
> pretty stupid, but then, what to do? Maybe #close\_noerror but then the  
> principle of least surprise (guessing method names and ways to call  
> them) is pretty broken 😕

Is it good enough to use rescue?

begin  
pixbuf\_loader.close  
rescue Gdk::PixbufError  
end

It is clear for me.

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/4 "2008-03-31T17:54:47Z")

</div>

> > I wanted to update the hiki documentation accordingly, but the  
> > “generic” username/password I was previously using doesn’t seem to  
> > work anymore (login “ruby-gnome2…”).
> 
> I removed authentication on POST and introduced bayes  
> filter. But bayes DB isn’t good enough. So your post is  
> rejected.
> 
> I registered your post as ham. Could you post again?

I’m sorry but I don’t understand “registered your post as ham”…

I’ve tried to login again but it failed (though I wonder if the old  
username was not with HTTP authentication), and I’ve tried to modify  
the page again, but still the same results: after clicking on “save” I  
have again the edit box, but this time no “preview” and “save” button,  
and if I try to go back to the page I see that the modifications are  
not saved.

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 6:07pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/5 "2008-03-31T18:07:55Z")

</div>

Kouhei disabled authentication and has installed spam filtering  
instead. Your message was mistakenly detected as spam so he marked it  
as non-spam (ham).

I would suggest to use password protection and put the password  
directly on the website. It’s very unlikely that a bot find the  
password and use it for posting content.

Mathieu

2008/4/1, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/6 "2008-03-31T17:43:05Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] closing a GdkPixbufLoader ignoring errors”  
on Mon, 31 Mar 2008 17:29:16 +0200,  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I wanted to update the hiki documentation accordingly, but the  
> “generic” username/password I was previously using doesn’t seem to  
> work anymore (login “ruby-gnome2…”).

I removed authentication on POST and introduced bayes  
filter. But bayes DB isn’t good enough. So your post is  
rejected.

I registered your post as ham. Could you post again?

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/7 "2008-03-31T23:00:25Z")

</div>

On Mon, Mar 31, 2008 at 6:05 PM, Mathieu B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Kouhei disabled authentication and has installed spam filtering  
> instead. Your message was mistakenly detected as spam so he marked it  
> as non-spam (ham).

Ah. And how long does it take to show up on the website? It’s still not  
there…

> > > > “generic” username/password I was previously using doesn’t seem to
> > 
> > removed\_email\_address@domain.invalid  
> > removed\_email\_address@domain.invalid  
> > [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/8 "2008-03-31T23:38:52Z")

</div>

> > Ah. And how long does it take to show up on the website? It’s still not there…
> 
> Sorry… Your post still marked as spam…  
> I’ve added an account that is same username/password before. If you login  
> from menu, your post will not be filtered.

Thanks, it’s fine!

–  
Guillaume C. - [Guillaume Cottenceau](http://zarb.org/~gc/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [March 31, 2008, 11:24pm UTC](https://www.ruby-forum.com/t/closing-a-gdkpixbufloader-ignoring-errors/133369/9 "2008-03-31T23:24:05Z")

</div>

Hi,

Mathieu, thanks for follow my English.

2008/4/1, Guillaume C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> On Mon, Mar 31, 2008 at 6:05 PM, Mathieu B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Kouhei disabled authentication and has installed spam filtering  
> > instead. Your message was mistakenly detected as spam so he marked it  
> > as non-spam (ham).
> 
> Ah. And how long does it take to show up on the website? It’s still not there…

Sorry… Your post still marked as spam…  
I’ve added an account that is same username/password before. If you  
login  
from menu, your post will not be filtered.

## Thanks,

kou
