summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-03 09:44:39 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-03 09:44:39 -0700
commit139fae50e175a067ccd34c276f662e8abc14bec3 (patch)
tree580fb4ded49ffe901a1367e8d8a78770ef2f38dc /struct.c
parent907ff4e00fe3457369afbcb25ef253aaac23a022 (diff)
downloadtxr-139fae50e175a067ccd34c276f662e8abc14bec3.tar.gz
txr-139fae50e175a067ccd34c276f662e8abc14bec3.tar.bz2
txr-139fae50e175a067ccd34c276f662e8abc14bec3.zip
Fix inappropriate "does not name a struct type" error.
* struct.c (struct_handle): The situation is that the object isn't a structure instance, not that the argument isn't a struct type. Use appropriate error message.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 054b5f09..30f0ad15 100644
--- a/struct.c
+++ b/struct.c
@@ -369,7 +369,8 @@ static struct struct_inst *struct_handle(val obj, val ctx)
{
if (cobjp(obj) && obj->co.ops == &struct_inst_ops)
return coerce(struct struct_inst *, obj->co.handle);
- no_such_struct(ctx, obj);
+ uw_throwf(error_s, lit("~a: ~s isn't a structure"),
+ ctx, obj, nao);
}
val copy_struct(val strct)