use of org.odk.collect.android.exception.BadUrlException in project collect by opendatakit.
the class InstanceGoogleSheetsUploader method setUpSpreadsheet.
private void setUpSpreadsheet(String urlString) throws UploadException, GoogleJsonResponseException {
if (spreadsheet == null || spreadsheet.getSpreadsheetUrl() == null || !urlString.equals(spreadsheet.getSpreadsheetUrl())) {
try {
spreadsheet = sheetsHelper.getSpreadsheet(UrlUtils.getSpreadsheetID(urlString));
spreadsheet.setSpreadsheetUrl(urlString);
} catch (GoogleJsonResponseException e) {
Timber.i(e);
throw e;
} catch (IOException | BadUrlException e) {
Timber.i(e);
throw new UploadException(e);
}
}
}
Aggregations