Java Code Examples for com.dropbox.core.DbxException#printStackTrace()

The following examples show how to use com.dropbox.core.DbxException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserAccountTask.java    From fingen with Apache License 2.0 5 votes vote down vote up
@Override
protected FullAccount doInBackground(Void... params) {
    try {
        //get the users FullAccount
        return dbxClient.users().getCurrentAccount();
    } catch (DbxException e) {
        e.printStackTrace();
        error = e;
    }
    return null;
}
 
Example 2
Source File: Dropbox.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Finishes the authorization process. The returned access token can be
 * saved for future use.
 * 
 * @param authorizationCode The authorization code that the user see in the
 *        authorization page

 * @return The access token
 */
public String finishAuthorization(String authorizationCode) {
	DbxWebAuth webAuth = prepareWebAuth();
	try {
		DbxAuthFinish authFinish = webAuth.finishFromCode(authorizationCode);
		return authFinish.getAccessToken();
	} catch (DbxException e) {
		e.printStackTrace();
	}
	return null;
}