lua-users home
lua-l archive

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


Is there an official way to evaluate errors so that I am able to
different between e.g. loadfile(<File>) failed because file not found or
failed because code is corrupt?

Is the error message fixed so that evaluation is assured in a long-term?

Possible it would be better to define a standard error behaviour like:
nil|false [,<Errornumber> [,<Errormessage>]]
Errornumber must be defined in ranges for:
- Lua itself -> fixed errornumber list
- Users      -> free

The situation now is: first check if the file exists and if so then use
loadfile(). Alternatives?


--
Markus