From 62f9959a8e4269293ee80c3bfe3f55e8b12f7ccd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 26 Feb 2012 14:57:41 +0000 Subject: replace bmesh_error with macro that gives the file/line/func the error happens on. --- source/blender/bmesh/intern/bmesh_mesh.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_mesh.c') diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 097c87ca1c6..7d8e55347f5 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -51,14 +51,16 @@ int bm_mesh_allocsize_default[4] = {512, 512, 2048, 512}; /* bmesh_error stub */ -void bmesh_error(void) +void _bmesh_error(const char *at, const char *func) { - printf("BM modelling error!\n"); + fprintf(stderr, "BM modelling error '%s', func '%s'!\n", at, func); +#ifdef WITH_ASSERT_ABORT /* This placeholder assert makes modelling errors easier to catch * in the debugger, until bmesh_error is replaced with something * better. */ - BLI_assert(0); + abort(); +#endif } static void bmesh_mempool_init(BMesh *bm, const int allocsize[4]) -- cgit v1.2.3