The standard panic function was using 'lua_tostring', which may raise a memory-allocation error if error value is a number.