lua-users home
lua-l archive

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

How do I make require() not cause a stack trace when a module is not found?

I have a program that sometime runs on an embedded system where some
modules may not be available.  I can't just install the module for
various reasons.

If it matters, the module is zlib.  Everything works without it, but
it can reduce bandwidth if I have it.

I tried wrapping it in pcall, but that didn't work.