Re: [Vala] How does IOError.from_errno works?
- From: Andre Masella <andre masella name>
- To: Guillaume Poirier-Morency <guillaumepoiriermorency gmail com>
- Cc: Vala <vala-list gnome org>
- Subject: Re: [Vala] How does IOError.from_errno works?
- Date: Tue, 3 Mar 2015 06:36:05 -0500
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 <
guillaumepoiriermorency 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 <guillaumepoiriermorency gmail com>
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
--
--Andre Masella<andre masella name>
http://www.masella.name/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]