[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Joining stdout and stderr
- From: David Given <dg@...>
- Date: Tue, 20 Dec 2005 20:45:14 +0000
On Tuesday 20 December 2005 19:23, Dolan, Ryanne Thomas (UMR-Student) wrote:
> or you could redefine error() to write to stdout in Lua:
The problem with that is that if his code calls another module which uses its
own error() implementation, it'll still invoke the default error handler
which will write to stdout.
Catching errors with pcall and using a custom error handler avoids this
(equivalent to registering a global exception handler).
--
+- David Given --McQ-+
| dg@cowlark.com | HORAY FOR POKEY THE PENGUIN!
| (dg@tao-group.com) |
+- www.cowlark.com --+
Attachment:
pgphiGwJcy4ej.pgp
Description: PGP signature