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


Java BugSenseHandler.sendException方法代码示例

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


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

示例1: onFailure

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onFailure(FastRequest request, VolleyError error) {
    super.onFailure(request, error);
    if(error instanceof SessionError){
        FastAlert.error(this, error.getMessage());
        Activity activity = getActivity();
        if(activity != null){
            startActivity(new Intent(getActivity(), LoginActivity.class));
            getActivity().finish();
        }
    }else if(error instanceof SomeError){
        FastAlert.error(this, error.getMessage());
    }else{
        BugSenseHandler.sendException(error);
    }
}
 
开发者ID:2fast2fourier,项目名称:something.apk,代码行数:17,代码来源:SomeFragment.java

示例2: onError

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
public static synchronized void onError(String errorId, Exception exception) {
	FlurryAgent.onError(errorId, exception.toString(), exception.getClass().getName());
	
	/* Only log exceptions which are NOT ApiClientExceptions with an ErrorCode (because they're
	 * all about connection errors which I have no influence on) */
	if(!(exception instanceof ApiClientException && ((ApiClientException)exception).hasCode())) {
		BugSenseHandler.sendException(exception);
	}
	
	if(Studentportal.isDebugBuild()) {
		Log.e("Analytics", "exception logged", exception);
	}
}
 
开发者ID:protyposis,项目名称:Studentenportal,代码行数:14,代码来源:Analytics.java

示例3: generatePostTemplates

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
private synchronized static void generatePostTemplates(Context context){
    try {
        InputStreamReader postMustReader = new InputStreamReader(context.getResources().getAssets().open("mustache/post.mustache"), Charsets.UTF_8);
        postTemplate = Mustache.compiler().compile(postMustReader);

        InputStreamReader pmMustReader = new InputStreamReader(context.getResources().getAssets().open("mustache/pm.mustache"), Charsets.UTF_8);
        pmTemplate = Mustache.compiler().compile(pmMustReader);

        InputStreamReader previewMustReader = new InputStreamReader(context.getResources().getAssets().open("mustache/preview.mustache"), Charsets.UTF_8);
        previewTemplate = Mustache.compiler().compile(previewMustReader);

        InputStreamReader headerInput = new InputStreamReader(context.getResources().getAssets().open("mustache/header.mustache"), Charsets.UTF_8);
        headerTemplate = Mustache.compiler().compile(headerInput);

        InputStreamReader footerInput = new InputStreamReader(context.getResources().getAssets().open("mustache/footer.mustache"), Charsets.UTF_8);
        footerTemplate = Mustache.compiler().compile(footerInput);

        Closeables.close(previewMustReader, true);
        Closeables.close(pmMustReader, true);
        Closeables.close(headerInput, true);
        Closeables.close(footerInput, true);
        Closeables.close(postMustReader, true);
    } catch (IOException e) {
        e.printStackTrace();
        //should never happen, log via bugsense just in case
        BugSenseHandler.sendException(e);
    }
}
 
开发者ID:2fast2fourier,项目名称:something.apk,代码行数:29,代码来源:MustCache.java

示例4: surfaceCreated

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void surfaceCreated(SurfaceHolder holder) {
	// The Surface has been created, now tell the camera where to draw the preview.
	try {
		if (CallerFlashlight.LOG) Log.d(TAG, "surfaceCreated");
		mCamera.setPreviewDisplay(holder);

		mCamera.startPreview();
	} catch (Exception e) {
		if (CallerFlashlight.LOG) Log.d(TAG, "Error setting camera preview: " + e.getMessage());
		BugSenseHandler.sendException(e);
	}
}
 
开发者ID:futerox,项目名称:FlashAlerts,代码行数:14,代码来源:CameraSurface.java

示例5: parseHtmlResponse

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public PMListResult parseHtmlResponse(Request<PMListResult> request, NetworkResponse response, Document document) throws Exception {
    ArrayList<PrivateMessageFolderItem> pmFolders = new ArrayList<PrivateMessageFolderItem>();
    ArrayList<PrivateMessageItem> pm = new ArrayList<PrivateMessageItem>();
    Elements messages = document.getElementsByTag("tbody").first().getElementsByTag("tr");
    for(Element message : messages){
        try{
            Element name = message.getElementsByClass("title").first();
            if(name != null){
                Matcher idMatch = pmIdPattern.matcher(name.getElementsByTag("a").attr("href"));
                if(idMatch.find()){
                    int id = Integer.parseInt(idMatch.group(1));
                    String author = message.getElementsByClass("sender").text();
                    String title = message.getElementsByClass("title").text();
                    String date = message.getElementsByClass("date").text();

                    int status = PrivateMessageItem.STATUS_NORMAL;
                    Element statusDiv = message.getElementsByClass("status").first();
                    if(statusDiv != null){
                        String statusImg = statusDiv.getElementsByTag("img").attr("src");
                        if(statusImg.contains("pmreplied")){
                            status = PrivateMessageItem.STATUS_REPLIED;
                        }else if(statusImg.contains("newpm")){
                            status = PrivateMessageItem.STATUS_NEW;
                        }else if(statusImg.contains("pmforwarded")){
                            status = PrivateMessageItem.STATUS_FORWARDED;
                        }else{
                            status = PrivateMessageItem.STATUS_NORMAL;
                        }
                    }

                    pm.add(new PrivateMessageItem(id, title, author, date, status, folderId));
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            BugSenseHandler.sendException(e);
        }
    }

    Elements folders = document.getElementsByClass("folder").first().getElementsByTag("option");
    for(Element folder : folders){
        pmFolders.add(new PrivateMessageFolderItem(Integer.parseInt(folder.attr("value")), folder.text(), folder.hasAttr("selected")));
    }

    return new PMListResult(pm, pmFolders);
}
 
开发者ID:2fast2fourier,项目名称:something.apk,代码行数:48,代码来源:PrivateMessageListRequest.java

示例6: loadParameters

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
private void loadParameters() {
	if (cf.getType() == CallerFlashlight.TYPE_ALTERNATIVE || cf.getType() == CallerFlashlight.TYPE_ALTERNATIVE_2) {

		LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(1, 1);

		if (cf.getType() == CallerFlashlight.TYPE_ALTERNATIVE) {
			layoutParams.setMargins(1000, 1000, 1000, 1000);
		} else if (cf.getType() == CallerFlashlight.TYPE_ALTERNATIVE_2) {
			layoutParams.setMargins(cf.getScreenWidth() - 1, cf.getScreenHeight() - 50, 0, 0);
		}

		//		preview.setLayoutParams(layoutParams);
		//			FrameLayout frame = new FrameLayout(cf.getApplicationContext());

		orientationChanger = new LinearLayout(cf.getApplicationContext());

		WindowManager.LayoutParams orientationLayout = new WindowManager.LayoutParams(WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, 0,
				PixelFormat.RGBA_8888);

		WindowManager wm = (WindowManager) cf.getApplicationContext().getSystemService(Service.WINDOW_SERVICE);

		FrameLayout frame = new FrameLayout(cf.getApplicationContext());
		frame.setLayoutParams(layoutParams);
		CameraSurface preview = new CameraSurface(cf.getApplicationContext(), cam);
		preview.setLayoutParams(layoutParams);

		frame.addView(preview);

		orientationChanger.addView(frame);
		orientationChanger.setVisibility(View.VISIBLE);

		wm.addView(orientationChanger, orientationLayout);

	}
	try {
		//			if (cf.getType() == CallerFlashlight.TYPE_NORMAL || cf.getType() == CallerFlashlight.TYPE_ALTERNATIVE) {
		pon = cam.getParameters();
		poff = cam.getParameters();
		pon.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
		poff.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
		//			} else if (cf.getType() == CallerFlashlight.TYPE_ALTERNATIVE_2) {
		//				pon = cam.getParameters();
		//				poff = cam.getParameters();
		//				pon.setFlashMode(Camera.Parameters.FLASH_MODE_ON);
		//				poff.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
		//			}
	} catch (Exception e) {
		if (CallerFlashlight.LOG) Log.d(TAG, "unable to get parameters");
		e.printStackTrace();
		BugSenseHandler.sendException(e);
	}
}
 
开发者ID:futerox,项目名称:FlashAlerts,代码行数:53,代码来源:Flash.java


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