I don't think :on('error') or :on('exit') were ported to luvit 2.0.
It should work for capturing signals, but I believe they are now lowercase.
https://github.com/luvit/luvit/blob/5c9767d564d421495add65314f5e80a30876ed10/tests/test-process.lua#L19-L24
On Wed, May 6, 2015 at 1:41 PM, Ryan Liptak <[email protected]> wrote:
> Shouldn't it be *process:on*?
>
>
> On Monday, May 4, 2015 at 12:15:38 PM UTC-7, develephant wrote:
>>
>> Hi,
>>
>> I am trying to catch process codes, which works on an earlier v1 project,
>> but I keep getting an error about the structure of the call in the latest
>> release, for example using:
>>
>> luvit version: 2.1.2
>> luvi version: v2.0.3
>>
>> Code:
>>
>> *process.on( 'error', function( e )*
>> * p( "Process Error", e )*
>> *end )*
>>
>> *process.on( 'uncaughtException', function( e )*
>> * p( "Process Error", e )*
>> *end )*
>>
>> *process.on( 'SIGHUP', function( e )*
>> * p( "Process Error", e )*
>> *end )*
>>
>> All versions fail with an error:
>>
>> Uncaught exception:
>> [string "bundle:/deps/process.lua"]:80: bad argument #2 to 'signal_start'
>> (Missing Signal name)
>> stack traceback:
>> [C]: in function 'signal_start'
>> [string "bundle:/deps/process.lua"]:80: in function 'on'
>> *...*
>>
>> Any enlightenment appreciated.
>>
>> Best.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "luvit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.