Java Code Examples for com.umeng.analytics.MobclickAgent#reportError()

The following examples show how to use com.umeng.analytics.MobclickAgent#reportError() . 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: ApiRequest.java    From ChipHellClient with Apache License 2.0 6 votes vote down vote up
protected void onSuccess(T result) {
    if (mCallback != null) {
        //线上状态catch异常
        if (!BuildConfig.DEBUG) {
            try {
                mCallback.onSuccess(result);
            } catch (Exception e) {
                mCallback.onFailure(new NullPointerException("出错啦,请稍后重试"), "出错啦,请稍后重试");
                MobclickAgent.reportError(ChhApplication.getInstance(), e);
            }
        } else {
            mCallback.onSuccess(result);
        }

    }
}
 
Example 2
Source File: AppManager.java    From MarkdownEditors with Apache License 2.0 5 votes vote down vote up
/**
 * 退出应用程序
 *
 * @param context 上下文
 */
public void AppExit(Context context) {
    try {
        MobclickAgent.onKillProcess(BaseApplication.context());
        finishAllActivity();
        // 杀死该应用进程
        android.os.Process.killProcess(android.os.Process.myPid());
        System.exit(0);
    } catch (Exception e) {
        MobclickAgent.reportError(BaseApplication.context(), e);
    }
}
 
Example 3
Source File: AppMain.java    From mobile-manager-tool with MIT License 5 votes vote down vote up
@Override
public void uncaughtException(Thread thread, Throwable ex) {
    String errorMsg = "-----------------------------" + SystemUtils.getDeviceDetailInfo()
            + "-----------------------------" +getThrowableInfo(ex);
    MobclickAgent.reportError(getApplicationContext(), errorMsg);
    writeCrashLog(errorMsg);
}
 
Example 4
Source File: MobclickAgentProxy.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
public static void reportError(Context arg0, String arg1)
{
	if (!DEBUG)
	{
		MobclickAgent.reportError(arg0, arg1);
	}
}
 
Example 5
Source File: MobclickAgentProxy.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
public static void reportError(Context arg0, Throwable arg1)
{
	if (!DEBUG)
	{
		MobclickAgent.reportError(arg0, arg1);
	}
}
 
Example 6
Source File: ApiRequest.java    From ChipHellClient with Apache License 2.0 5 votes vote down vote up
protected void onCache(T result) {
    if (mCallback != null) {
        //线上状态catch异常
        if (!BuildConfig.DEBUG) {
            try {
                mCallback.onCache(result);
            } catch (Exception e) {
                MobclickAgent.reportError(ChhApplication.getInstance(), e);
            }
        } else {
            mCallback.onCache(result);
        }
    }
}
 
Example 7
Source File: BookcasePresenter.java    From FriendBook with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void onLoadDataError(Throwable e, boolean isRefresh) {
    MobclickAgent.reportError(getView().provideContext(), e);
    super.onLoadDataError(e, isRefresh);
}
 
Example 8
Source File: UmengAnalytics.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public static void exception(Context context, Exception exception1)
{
    MobclickAgent.reportError(context, exception1);
}
 
Example 9
Source File: UmengAnalytics.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public static void exception(Context context, String s)
{
    MobclickAgent.reportError(context, s);
}