From: DRC Date: Thu, 26 Feb 2015 18:24:03 +0000 (-0600) Subject: encperf, decperf: catch fopen() errors X-Git-Tag: v1.4.90~37^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F139%2Fhead;p=tigervnc.git encperf, decperf: catch fopen() errors This prevents unhandled exceptions if the file isn't found. --- diff --git a/tests/decperf.cxx b/tests/decperf.cxx index 6714cb10..1d0c80c4 100644 --- a/tests/decperf.cxx +++ b/tests/decperf.cxx @@ -145,9 +145,9 @@ static double runTest(const char *fn) CConn *cc; double time; - cc = new CConn(fn); - try { + cc = new CConn(fn); + while (true) cc->processMsg(); } catch (rdr::EndOfStream e) { diff --git a/tests/encperf.cxx b/tests/encperf.cxx index 2628b46a..bbaa8fb5 100644 --- a/tests/encperf.cxx +++ b/tests/encperf.cxx @@ -337,9 +337,9 @@ static double runTest(const char *fn, double& ratio, unsigned long long& bytes, CConn *cc; double time; - cc = new CConn(fn); - try { + cc = new CConn(fn); + while (true) cc->processMsg(); } catch (rdr::EndOfStream e) {