Search in sources :

Example 6 with TException

use of com.evernote.thrift.TException in project Notes by lguipeng.

the class BootstrapManager method getBootstrapInfo.

/**
 * Makes a web request to get the latest bootstrap information.
 * This is a requirement during the oauth process
 *
 * @return {@link BootstrapInfoWrapper}
 * @throws Exception
 */
BootstrapInfoWrapper getBootstrapInfo() throws Exception {
    Log.d(LOGTAG, "getBootstrapInfo()");
    BootstrapInfo bsInfo = null;
    try {
        if (mBootstrapServerUsed == null) {
            initializeUserStoreAndCheckVersion();
        }
        bsInfo = mEvernoteSession.getEvernoteClientFactory().getUserStoreClient(getUserStoreUrl(mBootstrapServerUsed), null).getBootstrapInfo(mLocale.toString());
        printBootstrapInfo(bsInfo);
    } catch (TException e) {
        Log.e(LOGTAG, "error getting bootstrap info", e);
    }
    return new BootstrapInfoWrapper(mBootstrapServerUsed, bsInfo);
}
Also used : TException(com.evernote.thrift.TException) BootstrapInfo(com.evernote.edam.userstore.BootstrapInfo)

Aggregations

TException (com.evernote.thrift.TException)6 EDAMSystemException (com.evernote.edam.error.EDAMSystemException)4 EDAMUserException (com.evernote.edam.error.EDAMUserException)4 EDAMNotFoundException (com.evernote.edam.error.EDAMNotFoundException)3 FileInputStream (java.io.FileInputStream)3 InputStream (java.io.InputStream)3 SharedPreferences (android.content.SharedPreferences)2 EvernoteNoteStoreClient (com.evernote.client.android.asyncclient.EvernoteNoteStoreClient)2 FileData (com.evernote.client.conn.mobile.FileData)2 Note (com.evernote.edam.type.Note)2 Notebook (com.evernote.edam.type.Notebook)2 Resource (com.evernote.edam.type.Resource)2 ResourceAttributes (com.evernote.edam.type.ResourceAttributes)2 User (com.evernote.edam.type.User)2 EvernoteUser (com.yydcdut.note.entity.user.EvernoteUser)2 IUser (com.yydcdut.note.entity.user.IUser)2 QQUser (com.yydcdut.note.entity.user.QQUser)2 RxException (com.yydcdut.note.model.rx.exception.RxException)2 BufferedInputStream (java.io.BufferedInputStream)2 File (java.io.File)2