SHA256
1
0
forked from pool/icu
icu/icu-error-reporting.diff
Ismail Dönmez 32693d78b4 - Update to new upstream release 58.2
* CLDR 30.0.3:
    + Fix incorrect data for number of Cantonese speakers in China.
    + Hani_Latn transform was not updated with Unihan 9.0 kMandarin
      readings.
  * Time zone database version 2016j
  * #12815 uspoof_getSkeleton sets backwards-incompatible illegal
    argument exception
  * #12825 uspoof_check goes into an "infinite loop" when U+30FB
    is in an input string
  * #12832 GreekUpper::toUpper skips the final character on a
    non-terminated UTF-8 string
  * #12849 u_strToTitle returns incorrect length if destination
    is NULL

OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=71
2016-12-10 15:27:45 +00:00

65 lines
2.3 KiB
Diff

Date: 2014-08-13 15:39:48.523887951 +0200
From: Jan Engelhardt <jengelh@inai.de>
Error messages are totally useless without the actual error cause!
---
source/tools/toolutil/package.cpp | 5 +++--
source/tools/toolutil/writesrc.c | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
Index: icu/source/tools/toolutil/package.cpp
===================================================================
--- icu.orig/source/tools/toolutil/package.cpp
+++ icu/source/tools/toolutil/package.cpp
@@ -35,6 +35,7 @@
#include "package.h"
#include "cmemory.h"
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -748,7 +749,7 @@ Package::writePackage(const char *filena
// create the file and write its contents
file=fopen(filename, "wb");
if(file==NULL) {
- fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename);
+ fprintf(stderr, "icupkg: unable to create file \"%s\": %s\n", filename, strerror(errno));
exit(U_FILE_ACCESS_ERROR);
}
@@ -1169,7 +1170,7 @@ Package::extractItem(const char *filesPa
makeFullFilenameAndDirs(filesPath, outName, filename, (int32_t)sizeof(filename));
file=fopen(filename, "wb");
if(file==NULL) {
- fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename);
+ fprintf(stderr, "icupkg: unable to create file \"%s\": %s\n", filename, strerror(errno));
exit(U_FILE_ACCESS_ERROR);
}
fileLength=(int32_t)fwrite(pItem->data, 1, pItem->length, file);
Index: icu/source/tools/toolutil/writesrc.c
===================================================================
--- icu.orig/source/tools/toolutil/writesrc.c
+++ icu/source/tools/toolutil/writesrc.c
@@ -18,7 +18,9 @@
* Helper functions for writing source code for data.
*/
+#include <errno.h>
#include <stdio.h>
+#include <string.h>
#include <time.h>
#include "unicode/utypes.h"
#include "unicode/putil.h"
@@ -64,8 +66,8 @@ usrc_createWithHeader(const char *path,
} else {
fprintf(
stderr,
- "usrc_create(%s, %s): unable to create file\n",
- path!=NULL ? path : "", filename);
+ "usrc_create(%s, %s): unable to create file: %s\n",
+ path!=NULL ? path : "", filename, strerror(errno));
}
return f;
}