From 21bf59c6cdb4f26ef5da1170ea21d9a3be26f502 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 26 Jul 2007 22:54:32 +0000 Subject: [PATCH] Be stricter in case of errors in loops. We do always fully fail now, if an error occurs. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21707 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/resattr/resattr.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/resattr/resattr.cpp b/src/tools/resattr/resattr.cpp index e973335e1d..16e855d6b7 100644 --- a/src/tools/resattr/resattr.cpp +++ b/src/tools/resattr/resattr.cpp @@ -100,7 +100,7 @@ write_attributes(BNode &out, const char *inFileName, BResources &resources, // should not happen fprintf(stderr, "Failed to get resource `%s', type: %lx, id: %ld " "from input file `%s'\n", name, type, id, inFileName); - continue; + exit(1); } // construct a name, if the resource doesn't have one @@ -134,7 +134,7 @@ write_resources(BResources &resources, const char *inFileName, BNode &in, if (error != B_OK) { fprintf(stderr, "Failed to get info for attribute `%s' of input " "file `%s': %s\n", name, inFileName, strerror(error)); - continue; + exit(1); } // read attribute @@ -145,7 +145,7 @@ write_resources(BResources &resources, const char *inFileName, BNode &in, fprintf(stderr, "Failed to read attribute `%s' of input " "file `%s': %s\n", name, inFileName, strerror(bytesRead)); delete[] data; - continue; + exit(1); } // find unique ID @@ -202,7 +202,7 @@ resources_to_attributes(const char *outputFile, const char **inputFiles, if (error != B_OK) { fprintf(stderr, "Failed to open input file `%s': %s\n", inputFiles[i], strerror(error)); - continue; + exit(1); } // open resources @@ -211,7 +211,7 @@ resources_to_attributes(const char *outputFile, const char **inputFiles, if (error != B_OK) { fprintf(stderr, "Failed to read resources of input file `%s': %s\n", inputFiles[i], strerror(error)); - continue; + exit(1); } // add the attributes @@ -253,7 +253,7 @@ attributes_to_resources(const char *outputFile, const char **inputFiles, if (error != B_OK) { fprintf(stderr, "Failed to open input file `%s': %s\n", inputFiles[i], strerror(error)); - continue; + exit(1); } // add the resources