lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


maybe you can try os.exit()

在 2011-6-25 晚上9:23,"marbux" <marbux@gmail.com>写道:
> Hi, all,
>
> I've spent a couple of hours now looking for the answer without
> success. Is there a simple method to terminate a script upon an error
> condition that occurs within a function, E.g.,
>
> function foo(bar)
> if bar == ""
> ???
> end
> ...
> end
>
> Appreciate any guidance here.
>
> Best regards,
>
> Paul
>