Package com.socrata.exceptions

Examples of com.socrata.exceptions.SodaError


                    } finally {
                        is.close();
                    }
                } catch (IOException ioe) {
                    throw new SodaError("Unable to load file: " + file.getAbsolutePath());
                }
            }
        };

        NonDataFileDataset nonDataFileDataset;
View Full Code Here


                    } finally {
                        is.close();
                    }
                } catch (IOException ioe) {
                    throw new SodaError("Unable to load file: " + file.getAbsolutePath());
                }
            }
        };

        NonDataFileDataset nonDataFileDataset;
View Full Code Here

            ClientResponse response = requester.issueRequest();
            return deserializeUpsertResult(response.getEntityInputStream());
        } catch (LongRunningQueryException e) {
            return getHttpLowLevel().getAsyncResults(e.location, e.timeToRetry, getHttpLowLevel().getMaxRetries(), UpsertResult.class, requester);
        } catch (IOException ioe) {
            throw new SodaError("Error upserting a dataset from this list of objects.  Error message: " + ioe.getLocalizedMessage());
        }
    }
View Full Code Here

            ClientResponse response = requester.issueRequest();
            return deserializeUpsertResult(response.getEntityInputStream());
        } catch (LongRunningQueryException e) {
            return getHttpLowLevel().getAsyncResults(e.location, e.timeToRetry, getHttpLowLevel().getMaxRetries(), UpsertResult.class, requester);
        } catch (IOException ioe) {
            throw new SodaError("Error replacing dataset from this list of objects.  Error message: " + ioe.getLocalizedMessage());
        }
    }
View Full Code Here

            return deserializeUpsertResult(response.getEntityInputStream());

        } catch (LongRunningQueryException e) {
            return getHttpLowLevel().getAsyncResults(e.location, mediaType, e.timeToRetry, getHttpLowLevel().getMaxRetries(), new GenericType<UpsertResult>(InputStream.class), requester);
        } catch (IOException ioe) {
            throw new SodaError("Error upserting a dataset from this stream.  Error message: " + ioe.getLocalizedMessage());
        }
    }
View Full Code Here

            return deserializeUpsertResult(response.getEntityInputStream());

        } catch (LongRunningQueryException e) {
            return getHttpLowLevel().getAsyncResults(e.location, mediaType, e.timeToRetry, getHttpLowLevel().getMaxRetries(), new GenericType<UpsertResult>(InputStream.class), requester);
        } catch (IOException ioe) {
            throw new SodaError("Error replacing a dataset from this stream.  Error message: " + ioe.getLocalizedMessage());
        }
    }
View Full Code Here

                return getHttpLowLevel().getAsyncResults(e.location, HttpLowLevel.CSV_TYPE, e.timeToRetry, getHttpLowLevel().getMaxRetries(), new GenericType<UpsertResult>(InputStream.class), requester);
            } finally {
                GeneralUtils.closeQuietly(is);
            }
        } catch (IOException ioe) {
            throw new SodaError("Cannot load CSV from the file " + GeneralUtils.bestFilePath(csvFile) + ".  Error message: " + ioe.getLocalizedMessage());
        }
    }
View Full Code Here

                return getHttpLowLevel().getAsyncResults(e.location, HttpLowLevel.CSV_TYPE, e.timeToRetry, getHttpLowLevel().getMaxRetries(), new GenericType<UpsertResult>(InputStream.class), requester);
            } finally {
                GeneralUtils.closeQuietly(is);
            }
        } catch (IOException ioe) {
            throw new SodaError("Cannot load CSV from the file " + GeneralUtils.bestFilePath(csvFile) + ".  Error message: " + ioe.getLocalizedMessage());
        }
    }
View Full Code Here

            return mapper.readValue(response.getEntity(InputStream.class), AssetResponse.class);
            //return response.getEntity(AssetResponse.class);
        } catch (LongRunningQueryException e) {
            return getHttpLowLevel().getAsyncResults(e.location, e.timeToRetry, getHttpLowLevel().getMaxRetries(), AssetResponse.class, requester);
        } catch (JsonMappingException e) {
            throw new SodaError("Illegal response from the service.");
        } catch (JsonParseException e) {
            throw new SodaError("Invalid JSON returned from the service.");
        } catch (IOException e) {
            throw new SodaError("Error communicating with service.");
        }
    }
View Full Code Here

TOP

Related Classes of com.socrata.exceptions.SodaError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.