Re: string.format a nil value
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: string.format a nil value
- From: David Jones <drj@...>
- Date: 2006年8月24日 10:53:02 +0100
On 24 Aug 2006, at 09:02, jason zhang wrote:
if I pass a nil value to string.format function, it will raise a
error and the interpreter quit.
For example,
string.format("%d",novalue), where novalue is a nil variant.
Why not outputing a "NIL" like string? It think it's not very
friendly to print a error information and
exit.
Wether it exits or not is entirely up to the C code that calls the
Lua code. It doesn't have to exit just because lua_pcall indicated
an error.
drj