You may do the following little dance to make it work: throw new Error(IOError.quark(), (int) IOError.from_errno(x), strerror(x));
where x is your error number. On 3 March 2015 at 03:45, Guillaume Poirier-Morency < guillaumepoiriermore...@gmail.com> wrote: > I would like to convert errors coming from some bindings to appropriate > IOError using errno codes. > > http://valadoc.org/#!api=gio-2.0/GLib.IOError.from_errno > > I have tried the following: > > throw IOError.from_errno (this.err.get_error ()); > > But I get the following complication error: > > src/vsgi/fastcgi.c:1170:10: erreur: incompatible types when > assigning to type ‘struct GError *’ from type ‘GIOErrorEnum’ > _tmp7_ = g_io_error_from_errno (_tmp6_); > > Is it a bug? > > Thanks in advance! > > -- > Guillaume Poirier-Morency <guillaumepoiriermore...@gmail.com> > > _______________________________________________ > vala-list mailing list > vala-list@gnome.org > https://mail.gnome.org/mailman/listinfo/vala-list > > -- --Andre Masella<an...@masella.name> http://www.masella.name/ _______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list