]> git.imager.perl.org - imager.git/blobdiff - error.c
[rt.cpan.org #29938] add matrix() method to Imager::Matrix2d
[imager.git] / error.c
diff --git a/error.c b/error.c
index a3f172b03d4a2d5f0cf1f8225e9a8007d0a80cd6..755f69d1e73d21833eca63821fafa5b8ff412027 100644 (file)
--- a/error.c
+++ b/error.c
@@ -188,7 +188,7 @@ the mark.
 
 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
 */
@@ -247,7 +247,7 @@ void i_push_error(int code, char const *msg) {
 }
 
 /*
-=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
 
@@ -277,7 +277,7 @@ void i_push_errorvf(int code, char const *fmt, va_list ap) {
 =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.
 
@@ -351,6 +351,21 @@ int i_failed(int code, char const *msg) {
 
 #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