# Is it possible to read GError raised by GStreamer?

**URL:** <https://www.ruby-forum.com/t/is-it-possible-to-read-gerror-raised-by-gstreamer/202266>\
**Category:** Ruby-Gnome 2\
**Created:** [January 25, 2011, 6:25pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-read-gerror-raised-by-gstreamer/202266 "2011-01-25T18:25:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 25, 2011, 6:25pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-read-gerror-raised-by-gstreamer/202266/1 "2011-01-25T18:25:10Z")

</div>

Hi,

I use ruby-gnome2 bindings to operate on GStreamer.

When my pipeline raises an error, I catch it on the bus.

The message that I receive is associated with so-called “structure”,  
which actually contain two keys, for example:

gerror = #\<#Class:0x7f7960ee7b78:0x7f7960ee78d0\>  
debug = gsttcpserversrc.c(437): gst\_tcp\_server\_src\_start ():  
/GstPipeline:pipeline0/GstTCPServerSrc:tcpserversrc0:  
bind failed: Address already in use

as debug can be translated by OS, I need to get into code of gerror.  
Seems that class is unnamed, and contains no specific functions to the  
GError.

Is there any way to read that?

m.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 18, 2011, 1:15am UTC](https://www.ruby-forum.com/t/is-it-possible-to-read-gerror-raised-by-gstreamer/202266/2 "2011-02-18T01:15:27Z")

</div>

hi marcin -

not sure if this helps at all - i may well be misunderstanding the  
question - but i use gstreamer with gtk2, and i parse the error messages  
like this…

bus = @pipeline.bus  
bus.add\_watch {|bus, message|  
case message.type  
when Gst::Message::ERROR  
p message.parse  
Gtk.main\_quit  
…}

-jk

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 21, 2011, 10:46pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-read-gerror-raised-by-gstreamer/202266/3 "2011-02-21T22:46:14Z")

</div>

I’ll check that later, thanks!

m.

2011/2/18 J. K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
