From b68568ff103cb3710dec1a9516c16ab9ab462754 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Thu, 20 Mar 1997 17:04:15 +0100
Subject: [PATCH] Made call to non-function error a bit more specific

Rev: src/interpret.c:1.38
---
 src/interpret.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/interpret.c b/src/interpret.c
index bda2abb481..73dd5d164f 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: interpret.c,v 1.37 1997/03/17 03:04:38 hubbe Exp $");
+RCSID("$Id: interpret.c,v 1.38 1997/03/20 16:04:15 grubba Exp $");
 #include "interpret.h"
 #include "object.h"
 #include "program.h"
@@ -1585,8 +1585,22 @@ void strict_apply_svalue(struct svalue *s, INT32 args)
     break;
   }
 
+  case T_INT:
+    if (!s->u.integer) {
+      error("Attempt to call the NULL-value\n");
+    } else {
+      error("Attempt to call the value %d\n", s->u.integer);
+    }
+  case T_STRING:
+    if (s->u.string->len > 20) {
+      error("Attempt to call the string \"%20s\"...\n", s->u.string->str);
+    } else {
+      error("Attempt to call the string \"%s\"\n", s->u.string->str);
+    }
+  case T_MAPPING:
+    error("Attempt to call a mapping\n");
   default:
-    error("Call to non-function value.\n");
+    error("Call to non-function value type:%d.\n", s->type);
   }
 
 #ifdef DEBUG
-- 
GitLab