From dc59426209de224edc0f67930c10b53aa1d81a30 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 19 Aug 2009 12:41:55 +0200 Subject: [PATCH] test: Print more info on error. --- test/libvlc/test.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/libvlc/test.h b/test/libvlc/test.h index 7ac1f20208..f706d3ea2b 100644 --- a/test/libvlc/test.h +++ b/test/libvlc/test.h @@ -84,11 +84,13 @@ static inline bool have_exception (void) return false; } -static inline void catch (void) +#define catch() catch_with_info(__FILE__, __FUNCTION__, __LINE__) + +static inline void catch_with_info (const char * file, const char * func, unsigned line) { if (libvlc_exception_raised (&ex)) { - fprintf (stderr, "Exception: %s\n", libvlc_errmsg ()); + fprintf (stderr, "%s:%s():%d Exception: %s\n", file, func, line, libvlc_errmsg ()); abort (); } libvlc_exception_clear (&ex); -- 2.39.2