From ad2b1d0d911b4f0b8d0174ae2cd6c14f4b3fc2ed Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 12 May 2014 12:58:10 -0700 Subject: [PATCH] chore(util/lua_list): improve error message in table_to_list aux function Signed-off-by: Leonardo de Moura --- src/util/lua_list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/lua_list.h b/src/util/lua_list.h index 572cc1c76..8725e0239 100644 --- a/src/util/lua_list.h +++ b/src/util/lua_list.h @@ -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 */ @@ -21,7 +22,7 @@ list 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"); } }