/** * Parses out a status code result. */ private void parseStatusCode(String line) { String value = line.substring(Prefixes.STATUS_CODE.length()).trim(); TestResult testInfo = getCurrentTestInfo(); try { testInfo.mCode = Integer.parseInt(value); } catch (NumberFormatException e) { Log.e(LOG_TAG, "Expected integer status code, received: " + value); } // this means we're done with current test result bundle reportResult(testInfo); clearCurrentTestInfo(); }
/** * Parses out a status code result. */ private void parseStatusCode(String line) { String value = line.substring(Prefixes.STATUS_CODE.length()).trim(); TestResult testInfo = getCurrentTestInfo(); testInfo.mCode = StatusCodes.ERROR; try { testInfo.mCode = Integer.parseInt(value); } catch (NumberFormatException e) { Log.w(LOG_TAG, "Expected integer status code, received: " + value); testInfo.mCode = StatusCodes.ERROR; } if (testInfo.mCode != StatusCodes.IN_PROGRESS) { // this means we're done with current test result bundle reportResult(testInfo); clearCurrentTestInfo(); } }