chore(util/lua_list): improve error message in table_to_list aux function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
1244a951f2
commit
ad2b1d0d91
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ Author: Leonardo de Moura
|
|||
*/
|
||||
#pragma once
|
||||
#include "util/list.h"
|
||||
#include "util/sstream.h"
|
||||
|
||||
namespace lean {
|
||||
/** \brief Convert a Lua table into a list<T> */
|
||||
|
@ -21,7 +22,7 @@ list<T> table_to_list(lua_State * L, int idx, Proc const & to_value) {
|
|||
}
|
||||
return r;
|
||||
} else {
|
||||
throw exception("invalid argument, lua table expected");
|
||||
throw exception(sstream() << "arg #" << idx << " must be a lua table");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue