lua-users home
lua-l archive

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


Hi,

Whenever the errors happened in app_functoin, the error_app_function tries to catch it, and construct an error response. But this make_safer_app returns the 'status', 'headers' 'fn' which are returned from coxpcall/xpcall, which means when error_app_function been called the headers, fn will be nil for sure.

app_function and error_app_function should both return whatever is returned by response:finish(), which should consist of a status code, headers, and an interator for the body ('fn').

  - yuri