diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-08-31 19:04:14 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-08-31 19:06:51 +0200 |
commit | 00549400f155d8e36b4ac718603fc945858fe50d (patch) | |
tree | e7a7530b24ff7f7c83dee07a6e5660aa730a3f3b /goo | |
parent | cd0764921064bfd455e9df52dc9bda6fbd2c2db2 (diff) |
xpdf303: error() changes, new param and formatting
Diffstat (limited to 'goo')
-rw-r--r-- | goo/JpegWriter.cc | 2 | ||||
-rw-r--r-- | goo/PNGWriter.cc | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/goo/JpegWriter.cc b/goo/JpegWriter.cc index 7ed5d524..201414b0 100644 --- a/goo/JpegWriter.cc +++ b/goo/JpegWriter.cc @@ -25,7 +25,7 @@ void outputMessage(j_common_ptr cinfo) (*cinfo->err->format_message) (cinfo, buffer); // Send it to poppler's error handler - error(-1, "%s", buffer); + error(errInternal, -1, "{0:s}", buffer); } JpegWriter::JpegWriter(int q, bool p, J_COLOR_SPACE cm) diff --git a/goo/PNGWriter.cc b/goo/PNGWriter.cc index d47efa61..d5b5df5f 100644 --- a/goo/PNGWriter.cc +++ b/goo/PNGWriter.cc @@ -59,25 +59,25 @@ bool PNGWriter::init(FILE *f, int width, int height, int hDPI, int vDPI) /* initialize stuff */ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) { - error(-1, "png_create_write_struct failed"); + error(errInternal, -1, "png_create_write_struct failed"); return false; } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { - error(-1, "png_create_info_struct failed"); + error(errInternal, -1, "png_create_info_struct failed"); return false; } if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "png_jmpbuf failed"); + error(errInternal, -1, "png_jmpbuf failed"); return false; } /* write header */ png_init_io(png_ptr, f); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "Error during writing header"); + error(errInternal, -1, "Error during writing header"); return false; } @@ -118,7 +118,7 @@ bool PNGWriter::init(FILE *f, int width, int height, int hDPI, int vDPI) png_write_info(png_ptr, info_ptr); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "error during writing png info bytes"); + error(errInternal, -1, "error during writing png info bytes"); return false; } @@ -134,7 +134,7 @@ bool PNGWriter::writePointers(unsigned char **rowPointers, int rowCount) png_write_image(png_ptr, rowPointers); /* write bytes */ if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "Error during writing bytes"); + error(errInternal, -1, "Error during writing bytes"); return false; } @@ -146,7 +146,7 @@ bool PNGWriter::writeRow(unsigned char **row) // Write the row to the file png_write_rows(png_ptr, row, 1); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "error during png row write"); + error(errInternal, -1, "error during png row write"); return false; } @@ -158,7 +158,7 @@ bool PNGWriter::close() /* end write */ png_write_end(png_ptr, info_ptr); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "Error during end of write"); + error(errInternal, -1, "Error during end of write"); return false; } |