Ondřej Surý avatar Ondřej Surý committed d93e499

Improve gd_error -> gd_error_ex usage

Comments (0)

Files changed (2)

 
 	gd_error("gd-jpeg: JPEG library reports unrecoverable error: ");
 	(*cinfo->err->output_message)(cinfo);
-	fflush(stderr);
 
 	jmpbufw = (jmpbuf_wrapper *)cinfo->client_data;
 	jpeg_destroy(cinfo);
 
 	if(jmpbufw != 0) {
 		longjmp(jmpbufw->jmpbuf, 1);
-		gd_error("gd-jpeg: EXTREMELY fatal error: longjmp returned control; terminating\n");
+		gd_error_ex(GD_ERROR, "gd-jpeg: EXTREMELY fatal error: longjmp returned control; terminating\n");
 	} else {
-		gd_error("gd-jpeg: EXTREMELY fatal error: jmpbuf unrecoverable; terminating\n");
+		gd_error_ex(GD_ERROR, "gd-jpeg: EXTREMELY fatal error: jmpbuf unrecoverable; terminating\n");
 	}
 
-	fflush(stderr);
 	exit(99);
 }
 
 	 * regardless of whether _BSD_SOURCE or anything else has (or has not)
 	 * been defined. */
 
-	gd_error("gd-png:  fatal libpng error: %s\n", msg);
-	fflush (stderr);
+	gd_error_ex(GD_ERROR, "gd-png: fatal libpng error: %s\n", msg);
 
 	jmpbuf_ptr = png_get_error_ptr (png_ptr);
 	if (jmpbuf_ptr == NULL) {				/* we are completely hosed now */
-		gd_error("gd-png:  EXTREMELY fatal error: jmpbuf unrecoverable; terminating.\n");
-		fflush (stderr);
+		gd_error_ex(GD_ERROR, "gd-png: EXTREMELY fatal error: jmpbuf unrecoverable; terminating.\n");
 		exit (99);
 	}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.