From 418f6ed5dd00e296b87b202a99753632fc593382 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 4 Aug 2013 16:19:29 +0800 Subject: added more error report --- eval.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'eval.cpp') diff --git a/eval.cpp b/eval.cpp index dd4be00..efd1114 100644 --- a/eval.cpp +++ b/eval.cpp @@ -43,6 +43,9 @@ void push(Cons * &pc, FrameObj ** &top_ptr, Environment *envt) { } else // Operational Invocation { + if (pc->car == empty_list) + throw NormalError(SYN_ERR_EMPTY_COMB); + *top_ptr++ = new RetAddr(pc); // Push the return address // static_cast because of is_simple_obj() is false pc = static_cast(pc->car); // Go deeper to enter the call -- cgit v1.2.3