[m-rev.] diff: a more informative message on an abort
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed Mar 23 11:50:18 AEDT 2005
runtime/mercury_deep_copy_body.h:
Generate a more informative message for an abort.
Zoltan.
cvs diff: Diffing .
Index: mercury_deep_copy_body.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_deep_copy_body.h,v
retrieving revision 1.69
diff -u -b -r1.69 mercury_deep_copy_body.h
--- mercury_deep_copy_body.h 14 Dec 2004 01:07:24 -0000 1.69
+++ mercury_deep_copy_body.h 14 Dec 2004 01:16:57 -0000
@@ -686,7 +686,16 @@
**
** We don't know how to copy it, so we have to abort.
*/
- MR_fatal_error("Cannot copy foreign type");
+ char *buf;
+ int len;
+
+ len = strlen(type_ctor_info->MR_type_ctor_module_name) +
+ strlen(type_ctor_info->MR_type_ctor_name) + 100;
+ buf = (char *) MR_malloc(len);
+ sprintf(buf, "Cannot copy foreign type %s.%s",
+ type_ctor_info->MR_type_ctor_module_name,
+ type_ctor_info->MR_type_ctor_name);
+ MR_fatal_error(buf);
}
}
return new_data;
cvs diff: Diffing GETOPT
cvs diff: Diffing machdeps
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list