[Date Prev][Date Next][Thread Prev][Thread Next]
- 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-+
| email@example.com | HORAY FOR POKEY THE PENGUIN!
| (firstname.lastname@example.org) |
+- www.cowlark.com --+
Description: PGP signature