Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pl.lapp: error message isn't "deterministic", and is misleading #247

Open
mooffie opened this issue May 8, 2017 · 0 comments
Open

pl.lapp: error message isn't "deterministic", and is misleading #247

mooffie opened this issue May 8, 2017 · 0 comments

Comments

@mooffie
Copy link

mooffie commented May 8, 2017

Run the following program many times, without arguments, under Lua 5.2 or 5.3:

local lapp = require 'pl.lapp'

local args = lapp [[
Arguments:
  <first>  (string)  first argument.
  <second> (string)  second argument.
]]

Sometimes the error message will be:

"missing required parameter: first"

and sometimes:

"missing required parameter: second"

The error message should be the one mentioning "first", not "second".

Under Lua 5.1 (and LuaJIT) the error message is deteministic; it's always:

"missing required parameter: second"

But this, too, should be fixed to mention "first".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant