Examples of DropboxServerException


Examples of com.dropbox.client2.exception.DropboxServerException

        } catch (IOException e) {
            throw new DropboxIOException(e);
        } catch (ParseException e) {
            if (DropboxServerException.isValidWithNullBody(response)) {
                // We have something from Dropbox, but it's an error with no reason
                throw new DropboxServerException(response);
            } else {
                // This is from Dropbox, and we shouldn't be getting it
                throw new DropboxParseException(bin);
            }
        } catch (OutOfMemoryError e) {
            throw new DropboxException(e);
        } finally {
            if (bin != null) {
                try {
                    bin.close();
                } catch (IOException e) {
                }
            }
        }

        int statusCode = response.getStatusLine().getStatusCode();
        if (statusCode != DropboxServerException._200_OK) {
            if (statusCode == DropboxServerException._401_UNAUTHORIZED) {
                throw new DropboxUnlinkedException();
            } else {
                throw new DropboxServerException(response, result);
            }
        }

        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.