From: Hugo van der Merwe <17109322+hugovdm@users.noreply.github.com> Date: Fri, 6 Mar 2020 13:41:52 +0000 (+0100) Subject: Review: use errCode.errIfFailureAndReset. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f705eaac5de5a7d4aae79c6feb6fb95bcb50ef5;p=icu Review: use errCode.errIfFailureAndReset. --- diff --git a/icu4c/source/test/intltest/unitstest.cpp b/icu4c/source/test/intltest/unitstest.cpp index 0f564174ef3..21fc22d4f13 100644 --- a/icu4c/source/test/intltest/unitstest.cpp +++ b/icu4c/source/test/intltest/unitstest.cpp @@ -258,9 +258,9 @@ void UnitsTest::testConversions() { u_parseDelimitedFile(path.data(), ';', fields, kNumFields, unitsTestDataLineFn, this, errorCode); - if (U_FAILURE(errorCode)) { - log_err_status(errorCode, "error parsing %s: %s\n", filename, - u_errorName(errorCode)); + if (errorCode.errIfFailureAndReset("error parsing %s: %s\n", filename, + u_errorName(errorCode))) { + return; } }