From 45f07f9924595fcb4c35fcbaf976a843ee06cd33 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 25 Jun 2012 16:26:36 -0600 Subject: [PATCH 1/2] Update method error output to show the expression it is trying to execute. --- include/chaiscript/language/chaiscript_eval.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chaiscript/language/chaiscript_eval.hpp b/include/chaiscript/language/chaiscript_eval.hpp index 4d21147..ea7902f 100644 --- a/include/chaiscript/language/chaiscript_eval.hpp +++ b/include/chaiscript/language/chaiscript_eval.hpp @@ -233,7 +233,7 @@ namespace chaiscript funcs.push_back(f); throw exception::eval_error("Error calling function '" + this->children[0]->text + "'", plb.objects, funcs, false, t_ss); } catch (const exception::bad_boxed_cast &) { - throw exception::eval_error("'" + this->children[0]->text + "' is not a function."); + throw exception::eval_error("'" + this->children[0]->pretty_print() + "' does not evaluate to a function."); } } catch(const exception::arity_error &e){ @@ -289,7 +289,7 @@ namespace chaiscript try { fn = boxed_cast(bv); } catch (const exception::bad_boxed_cast &) { - throw exception::eval_error("'" + this->children[0]->text + "' is not a function."); + throw exception::eval_error("'" + this->children[0]->pretty_print() + "' does not evaluate to a function."); } return (*fn)(plb); } From bf4f90a4ff173f100a8ccecd71d2b7a84b8b0a1d Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 25 Jun 2012 16:44:22 -0600 Subject: [PATCH 2/2] Fix build error for building without threads --- include/chaiscript/dispatchkit/bootstrap.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/chaiscript/dispatchkit/bootstrap.hpp b/include/chaiscript/dispatchkit/bootstrap.hpp index 6897dd5..fe57d70 100644 --- a/include/chaiscript/dispatchkit/bootstrap.hpp +++ b/include/chaiscript/dispatchkit/bootstrap.hpp @@ -13,6 +13,7 @@ #include "operators.hpp" #include "boxed_number.hpp" #include +#include namespace chaiscript {