Clears the error stack.
-Called by any imager function before doing any other processing.
+Called by any Imager function before doing any other processing.
=cut
*/
}
/*
-=item i_push_errorvf(int code, char const *fmt, va_list ap)
+=item i_push_errorvf(int C<code>, char const *C<fmt>, va_list C<ap>)
=category Error handling
=synopsis i_push_errorf(errno, "Cannot open file %s: %d", filename, errno);
=category Error handling
-A version of i_push_error() that does printf() like formating.
+A version of i_push_error() that does printf() like formatting.
Does not support perl specific format codes.
#endif
+/*
+=item im_assert_fail(file, line, message)
+
+Called when an im_assert() assertion fails.
+
+=cut
+*/
+
+void
+im_assert_fail(char const *file, int line, char const *message) {
+ fprintf(stderr, "Assertion failed line %d file %s: %s\n",
+ line, file, message);
+ exit(EXIT_FAILURE);
+}
+
/*
=back