当前位置: 首页>>代码示例>>Java>>正文


Java ParseException.printStackTrace方法代码示例

本文整理汇总了Java中com.parse.ParseException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ParseException.printStackTrace方法的具体用法?Java ParseException.printStackTrace怎么用?Java ParseException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.parse.ParseException的用法示例。


在下文中一共展示了ParseException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: computeUserName

import com.parse.ParseException; //导入方法依赖的package包/类
public String computeUserName()
  {
ParseUser user = getParseUser("user");


if (user != null)
{
	try
	{
		user.fetchIfNeeded();
		return user.getUsername();
	}
	catch (ParseException e)
	{
		e.printStackTrace();
	}

}

return "N/A";
  }
 
开发者ID:pagesjaunes,项目名称:androidMobileDeviceManager,代码行数:22,代码来源:Device.java

示例2: doInBackground

import com.parse.ParseException; //导入方法依赖的package包/类
@Override
protected Bundle doInBackground(Bundle... bundles) {
    Bundle bundle = bundles[0];
    ParseUser currentUser = ParseUser.getCurrentUser();
    if (bundle.getString(ParseTables.Users.NAME) != null) {
        currentUser.put(ParseTables.Users.NAME, bundle.getString(ParseTables.Users.NAME));
    }
    if (bundle.getString(ParseTables.Users.EMAIL) != null) {
        currentUser.put(ParseTables.Users.EMAIL, bundle.getString(ParseTables.Users.EMAIL));
        currentUser.setUsername(bundle.getString(ParseTables.Users.EMAIL));
    }
    if (bundle.getString(ParseTables.Users.DOB) != null) {
        currentUser.put(ParseTables.Users.DOB, bundle.getString(ParseTables.Users.DOB));
    }
    try {
        if (currentUser.getSessionToken() != null) {
            currentUser.save();
        } else {
            currentUser.setPassword("todoGenerateARandomString");
            currentUser.signUp();
        }
    } catch (ParseException e) {
        e.printStackTrace();
    }
    return bundle;
}
 
开发者ID:teamOSC,项目名称:Studddinv2_android,代码行数:27,代码来源:SignOnFragment.java

示例3: convertFileToBitmap

import com.parse.ParseException; //导入方法依赖的package包/类
public Bitmap convertFileToBitmap(ParseFile picFile){
    if(picFile == null){
        return null;
    }
    try {
        byte[] image = picFile.getData();
        if(image!=null){
            Bitmap pic = BitmapFactory.decodeByteArray(image, 0, image.length);
            return pic;
        }
    } catch (ParseException e) {
        e.printStackTrace();
        return null;
    }
    return null;
}
 
开发者ID:cfudge,项目名称:ClassDiscuss,代码行数:17,代码来源:util.java

示例4: getPic

import com.parse.ParseException; //导入方法依赖的package包/类
public Bitmap getPic(){
    ParseFile picFile=null;
    if(parseEntry!=null){
        if(parseEntry.getParseFile("ProfilePic")!=null){
            picFile = parseEntry.getParseFile("ProfilePic");
        };
    }

    if(picFile == null){
        return null;
    }
    try {
        byte[] image = picFile.getData();
        Bitmap pic = BitmapFactory.decodeByteArray(image, 0, image.length);
        return pic;
    } catch (ParseException e) {
        e.printStackTrace();
        return null;
    }
}
 
开发者ID:cfudge,项目名称:ClassDiscuss,代码行数:21,代码来源:Profile.java

示例5: getPic

import com.parse.ParseException; //导入方法依赖的package包/类
public Bitmap getPic() {
    if(triedPostPicFetch){
        //If we've already retrieved it before(or got null)
        //return the same result
        return postPic;
    }
    triedPostPicFetch = true;
    //fetch the picfile from parse
    ParseFile picFile = getParseFile("picture");
    if (picFile == null) {
        //there is no pic for this message
        return null;
    }
    else {
        Bitmap result = ImageOperations.bitmapFromPicFile(picFile, 300, 300);
        try {
            this.pin();
        } catch (ParseException e) {
            e.printStackTrace();
        }
        triedPostPicFetch = true;
        postPic = result;
        return result;
    }
}
 
开发者ID:cfudge,项目名称:ClassDiscuss,代码行数:26,代码来源:Message.java

示例6: getConnections

import com.parse.ParseException; //导入方法依赖的package包/类
public ArrayList<String> getConnections(String username) {
    List<ParseObject> ob = null;
    ArrayList<String> connectionList = new ArrayList<String>();
    ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("Connection");
    query.whereEqualTo("username", username);
    try {
        ob = query.find();
    } catch (ParseException e) {
        Log.e("Error", e.getMessage());
        e.printStackTrace();
    }
    for (ParseObject connection : ob) {
        connectionList = (ArrayList<String>) connection.get("connections");
    }
    return connectionList;
}
 
开发者ID:cfudge,项目名称:ClassDiscuss,代码行数:17,代码来源:OtherUsers.java

示例7: signup

import com.parse.ParseException; //导入方法依赖的package包/类
private void signup(String usernametxt, String passwordtxt) {
    if (!isEmpty()){

        int numberParse = 0;
        ParseQuery<ParseUser> numberofUsers = ParseUser.getQuery();  // Note to myself : count users in parse class
        try {
            numberParse=numberofUsers.count();
        } catch (ParseException e1) {
            e1.printStackTrace();
        }
        user = new ParseUser();
        user.setUsername(usernametxt);
        user.setPassword(passwordtxt);
        user.put("userID",numberParse+1);
        user.signUpInBackground(new SignUpCallback() {
            public void done(ParseException e) {
                checkSignup(e);
            }
        });
    }
}
 
开发者ID:safakesberk,项目名称:Cloud_Base-To-Do-App,代码行数:22,代码来源:LoginSignupActivity.java

示例8: getdata

import com.parse.ParseException; //导入方法依赖的package包/类
private ArrayList<QuotePojo> getdata( String s) {
    final ArrayList<QuotePojo> data = new ArrayList<QuotePojo>();
    ParseQuery<ParseObject> query = ParseQuery.getQuery("Quote");
    query.whereEqualTo("user_id", s);
    List<ParseObject> scoreList=null;
    try {
        scoreList =  query.find();
    } catch (ParseException e) {
        e.printStackTrace();
    }
    finally {
        if (scoreList!=null)
        for (int i = 0; i < scoreList.size(); i++) {
            data.add(new QuotePojo(scoreList.get(i).getString("quote"), scoreList.get(i).getString("author")
                    , null, null, 0));
        }
    }

    return data;
}
 
开发者ID:CompetentGroove,项目名称:quoteit_android,代码行数:21,代码来源:BaseActivity.java

示例9: getAnimeList

import com.parse.ParseException; //导入方法依赖的package包/类
@Override
public List<Anime> getAnimeList() {
    ArrayList<Anime> animeList = new ArrayList<>();
    int limit = 10000;
    int page = 0;
    try {
        boolean endReached = false;
        do {
            ParseQuery<AnimeRecord> query = AnimeRecord.getQuery();
            query.setLimit(limit);
            query.setSkip(page * limit);
            List<AnimeRecord> list = query.find();
            if (list != null) {
                for (AnimeRecord animeRecord : list) {
                    Anime anime = AnimeRecord.toAnime(animeRecord);
                    if (anime != null)
                        animeList.add(anime);
                }
                if (list.size() < limit)
                    endReached = true;
                else
                    page++;
            } else
                endReached = true;
        } while (!endReached);
    } catch (ParseException e) {
        e.printStackTrace();
    }
    WriteLog.appendLog(TAG,"Anime loaded from server: " + animeList.size());
    return animeList;
}
 
开发者ID:SalmanTKhan,项目名称:MyAnimeViewer,代码行数:32,代码来源:ParseManager.java

示例10: refreshAllNotes

import com.parse.ParseException; //导入方法依赖的package包/类
public List<Note> refreshAllNotes(){
    ParseQuery<Note> query = ParseQuery.getQuery(Note.class);
    query.whereEqualTo("toUser", UserAccount.getInstance().getUser());
    query.whereEqualTo("read", false);
    try {
        newNotes = query.find();
        System.out.println("SIZE : " + newNotes.size());
    } catch (ParseException e) {
        e.printStackTrace();
    } catch(NullPointerException n){

    }
    return newNotes;
}
 
开发者ID:donniepropst,项目名称:note.cntxt,代码行数:15,代码来源:DataSync.java

示例11: checkForNotes

import com.parse.ParseException; //导入方法依赖的package包/类
public List<Note> checkForNotes(){
    ParseQuery<Note> query = ParseQuery.getQuery(Note.class);
    query.whereEqualTo("toUser", UserAccount.getInstance().getUser());
    query.whereEqualTo("read", false);
    query.whereEqualTo("isCached", false);
    try {
        newNotes = query.find();
    } catch (ParseException e) {
        e.printStackTrace();
    }
    return newNotes;
}
 
开发者ID:donniepropst,项目名称:note.cntxt,代码行数:13,代码来源:DataSync.java

示例12: update

import com.parse.ParseException; //导入方法依赖的package包/类
public void update() {
    try {
        for (UserInfo info : users)
            info.fetchIfNeeded();
    } catch (ParseException e) {
        e.printStackTrace();
    }
}
 
开发者ID:whu-iss-jack,项目名称:langren,代码行数:9,代码来源:RoomInfo.java

示例13: update

import com.parse.ParseException; //导入方法依赖的package包/类
public static void update(){
    try {
        get().fetchIfNeeded();
    } catch (ParseException e) {
        e.printStackTrace();
    }
}
 
开发者ID:whu-iss-jack,项目名称:langren,代码行数:8,代码来源:Me.java

示例14: deleteUserAndLoginWithPhoneNumber

import com.parse.ParseException; //导入方法依赖的package包/类
@Test
public void deleteUserAndLoginWithPhoneNumber() {

    try {
        ParseCloud.callFunction("deleteTestUser", new HashMap<String, Object>());
    } catch (ParseException e) {
        e.printStackTrace();
    }

    loginWithPhoneNumber();
}
 
开发者ID:oscarb,项目名称:flowlist,代码行数:12,代码来源:LoginActivityTest.java

示例15: getDevices

import com.parse.ParseException; //导入方法依赖的package包/类
/**
 * Get all bootstrap Checkins that exists on Parse.com
 */
public List<Device> getDevices()
{
	//return getDeviceService().getDevices().getResults();
	ParseQuery<Device> query = ParseQuery.getQuery("Device");
	try
	{
		return query.find();
	}
	catch (ParseException e)
	{
		e.printStackTrace();
	}
	return null;
}
 
开发者ID:pagesjaunes,项目名称:androidMobileDeviceManager,代码行数:18,代码来源:BootstrapService.java


注:本文中的com.parse.ParseException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。