[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Adding a Return() function
- From: "Soni L." <fakedme@...>
- Date: Tue, 16 Dec 2014 23:38:23 -0200
On 16/12/14 11:18 PM, Sean Conner wrote:
It was thus said that the Great Soni L. once stated:
You know, we have error(), but it uses pcall... How can I add a Return()
function, coupled to the core? (because I'm pretty sure it's impossible
to do it with a lib)
Could you go into more detail about the problem that this will solve? Or
at least, how it would look in source?
if x or Return(nil, "missing x") then ... end
if not x then
return nil, "missing x"
It's literally a function like error() tightly coupled to the core, and
doesn't replace the return statement.
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.