diff src/dmimage.c @ 958:985225a93aeb

Add error code parameter to dmError() and dmErrorVA().
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 27 Feb 2015 03:58:25 +0200
parents 88d9440afad0
children 1ffc48d0feaf
line wrap: on
line diff
--- a/src/dmimage.c	Fri Feb 27 02:21:57 2015 +0200
+++ b/src/dmimage.c	Fri Feb 27 03:58:25 2015 +0200
@@ -121,7 +121,8 @@
 
     if (data == NULL)
     {
-        dmError("Error decoding image resource %p '%s' [%d, %d, %d]: %s\n",
+        dmError(DMERR_DATA_ERROR,
+            "Error decoding image resource %p '%s' [%d, %d, %d]: %s\n",
             file, file->filename, width, height, comp, stbi_failure_reason());
         return NULL;
     }
@@ -170,7 +171,8 @@
 
     if (result == NULL)
     {
-        dmError("Format conversion failed for image resource %p '%s' [%d, %d, %d].\n",
+        dmError(DMERR_DATA_ERROR,
+            "Format conversion failed for image resource %p '%s' [%d, %d, %d].\n",
             file, file->filename, width, height, comp);
     }