[code] Re: Error code/message from spawn()

From: Arnel <jalespring.att.gmail.com>
Date: Sun, 28 Feb 2016 12:24:03 +0800

Hi Mitchell,

On Sat, 27 Feb 2016 16:55:43 -0500 (EST)
Mitchell <m.att.foicica.com> wrote:

> Hi Arnel,
>
> On Sun, 28 Feb 2016, Arnel wrote:
>
> > Hi,
> >
> > The spawn() description in the Textadept API manual has a section for the spawn_proc:read() operation, which states that
> >
> >> If an error occurs while reading, returns nil, an error code, and an error message.
> >
> > What kind of code and message does it give if such an error happens? Is it the same as the ones returned by Lua's os.execute()[1]?
> >
> > [1] http://www.lua.org/manual/5.3/manual.html#pdf-os.execute
>
> That is a good question. For GTK I don't know the exact answer, but I
> suspect they are at least the same codes as Lua returns for the underlying
> OS IO functions. (GLib IO functions populate a `GError` object[1] that
> contains an error code and message.) For curses the code and message
> should be the same as Lua, as the C `errno` variable and `strerr()`
> function are used.
>
> Cheers,
> Mitchell
>
> [1]: https://developer.gnome.org/glib/stable/glib-IO-Channels.html#g-io-channel-read-line-string

Thanks for the pointer. I'm currently adapting my scripts to this new environment (Ubuntu Mate 14.04) - having this reference should hopefully get me where I need.

----
Thank you,
Arnel
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sat 27 Feb 2016 - 23:24:03 EST

This archive was generated by hypermail 2.2.0 : Sun 28 Feb 2016 - 06:28:25 EST