Closed cbnatrix closed 9 years ago
This is expected behavior for Lua 5.1. lua-periphery throws a table object on errors, which includes additional context that some applications may choose to use during error handling.
Unfortunately, the Lua 5.1 console does not call tostring()
on error objects it encounters, and instead gives you the error message you reported above. Newer versions of Lua (5.2, 5.3), will call tostring()
on error objects thrown to the console and format a more useful error message.
In all three versions, pcall()
behaves the same way and can be used the same way for error handling. This issue only applies to Lua 5.1 formatting errors in the console.
The error is raised because I didn't sudo lua. If I do, periphery works fine except that errors have an issue: $ lua Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
Pi 2, Raspian