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


Java Mint.logException方法代码示例

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


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

示例1: apiRequestComplete

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public void apiRequestComplete(Payload response) {

        //If the fragment has been detached, we don't process the result, as is not going to be shown
        // and could cause NullPointerExceptions
        if (super.getActivity() == null) return;

		if(response.isResult()){
			try {
				json = new JSONObject(response.getResultResponse());
				refreshPointsList();
			} catch (JSONException e) {
				Mint.logException(e);
				UIUtils.showAlert(super.getActivity(), R.string.loading, R.string.error_connection);
				e.printStackTrace();
			}
		} else {
            TextView tv = (TextView) getView().findViewById(R.id.fragment_points_title);
            tv.setVisibility(View.VISIBLE);
            tv.setText(R.string.error_connection_required);
		}
	}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:22,代码来源:PointsFragment.java

示例2: onActivityCreated

import com.splunk.mint.Mint; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
	super.onActivityCreated(savedInstanceState);
	
	prefs = PreferenceManager.getDefaultSharedPreferences(super.getActivity());
	webView = (WebView) super.getActivity().findViewById(R.id.about_webview);
	String lang = prefs.getString(PrefsActivity.PREF_LANGUAGE, Locale.getDefault().getLanguage());
	String url = Storage.getLocalizedFilePath(super.getActivity(), lang, "about.html");

	int defaultFontSize = Integer.parseInt(prefs.getString(PrefsActivity.PREF_TEXT_SIZE, "16"));
	webView.getSettings().setDefaultFontSize(defaultFontSize);
	
	webView.loadUrl(url);
	
	TextView versionNo = (TextView) super.getActivity().findViewById(R.id.about_versionno);
	try {
		String no = super.getActivity().getPackageManager().getPackageInfo(super.getActivity().getPackageName(), 0).versionName;
		versionNo.setText(getString(R.string.version,no));
	} catch (NameNotFoundException e) {
		Mint.logException(e);
		e.printStackTrace();
	}
}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:24,代码来源:AboutFragment.java

示例3: apiRequestComplete

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public void apiRequestComplete(Payload response) {
       //If the fragment has been detached, we don't process the result, as is not going to be shown
       // and could cause NullPointerExceptions
       if (super.getActivity() == null) return;

	if(response.isResult()){
		try {
			json = new JSONObject(response.getResultResponse());
			Log.d(TAG,json.toString(4));
			refreshBadgesList();
		} catch (JSONException e) {
			Mint.logException(e);
			UIUtils.showAlert(super.getActivity(), R.string.loading, R.string.error_connection);
			e.printStackTrace();
		}
	} else {
		TextView tv = (TextView) this.getView().findViewById(R.id.fragment_badges_title);
		tv.setVisibility(View.VISIBLE);
		tv.setText(R.string.error_connection_required);
	} 		
}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:22,代码来源:BadgesFragment.java

示例4: apiRequestComplete

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public void apiRequestComplete(Payload response) {
	// close dialog and process results
	pDialog.dismiss();

	if(response.isResult()){
		try {
			json = new JSONObject(response.getResultResponse());
			refreshTagList();
		} catch (JSONException e) {
			Mint.logException(e);
			e.printStackTrace();
			UIUtils.showAlert(this, R.string.loading, R.string.error_connection);
		}
	} else {
		UIUtils.showAlert(this, R.string.error, R.string.error_connection_required, new Callable<Boolean>() {
			public Boolean call() throws Exception {
				TagSelectActivity.this.finish();
				return true;
			}
		});
	}

}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:24,代码来源:TagSelectActivity.java

示例5: apiRequestComplete

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public void apiRequestComplete(Payload response) {
	progressDialog.dismiss();

	if(response.isResult()){
		try {
			json = new JSONObject(response.getResultResponse());
			refreshCourseList();
		} catch (JSONException e) {
			Mint.logException(e);
			e.printStackTrace();
			UIUtils.showAlert(this, R.string.loading, R.string.error_connection);
		}
	} else {
		UIUtils.showAlert(this, R.string.error, R.string.error_connection_required, new Callable<Boolean>() {
			public Boolean call() throws Exception {
               DownloadActivity.this.finish();
               return true;
			}
		});
	}
}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:22,代码来源:DownloadActivity.java

示例6: insertIntoDb

import com.splunk.mint.Mint; //导入方法依赖的package包/类
private void insertIntoDb(String table, String nullHack,
        ArrayList<ContentValues> contentValueCollection) {
    if (db == null) {
        return;
    }

    try {
        db.beginTransaction();
        for (ContentValues values : contentValueCollection) {
            insertIntoDb(table, nullHack, values);
        }
        db.setTransactionSuccessful();
        db.endTransaction();
    } catch (IllegalStateException e) {
        Mint.logException(e);
    }
}
 
开发者ID:mapzen,项目名称:open,代码行数:18,代码来源:RouteFragment.java

示例7: getCompleteResponses

import com.splunk.mint.Mint; //导入方法依赖的package包/类
private CourseXMLHandler getCompleteResponses(){
    if (completeParseHandler == null){
        if (courseXML.exists()) {
            try {
                SAXParserFactory parserFactory  = SAXParserFactory.newInstance();
                SAXParser parser = parserFactory.newSAXParser();
                reader = parser.getXMLReader();
                DbHelper db = DbHelper.getInstance(ctx);
                long userId = db.getUserId(SessionManager.getUsername(ctx));
                completeParseHandler = new CourseXMLHandler(courseId, userId, db);

                reader.setContentHandler(completeParseHandler);
                reader.setProperty("http://xml.org/sax/properties/lexical-handler", completeParseHandler);
                InputStream in = new BufferedInputStream(new FileInputStream(courseXML));
                reader.parse(new InputSource(in));


            } catch (Exception e) {
                Mint.logException(e);
                e.printStackTrace();
            }
        } else {
            Log.d(TAG, "course XML not found at: " + courseXML.getPath());
        }
    }
    return completeParseHandler;
}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:28,代码来源:CourseXMLReader.java

示例8: getMediaResponses

import com.splunk.mint.Mint; //导入方法依赖的package包/类
private IMediaXMLHandler getMediaResponses(){

        if (mediaParseHandler != null){
            return mediaParseHandler;
        }
        else if (completeParseHandler != null){
            return completeParseHandler;
        }
        else{
            if (courseXML.exists()) {
                try {
                    mediaParseHandler = new CourseMediaXMLHandler();
                    SAXParserFactory parserFactory  = SAXParserFactory.newInstance();
                    SAXParser parser = parserFactory.newSAXParser();
                    reader = parser.getXMLReader();
                    reader.setContentHandler(mediaParseHandler);
                    reader.setProperty("http://xml.org/sax/properties/lexical-handler", mediaParseHandler);
                    InputStream in = new BufferedInputStream(new FileInputStream(courseXML));
                    reader.parse(new InputSource(in));

                } catch (Exception e) {
                    Mint.logException(e);
                    e.printStackTrace();
                }
            } else {
                Log.d(TAG, "course XML not found at: " + courseXML.getPath());
            }
            return mediaParseHandler;
        }
    }
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:31,代码来源:CourseXMLReader.java

示例9: sendToMint

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public static void sendToMint(Exception e)
{
    if(Constants.isAppTrackingEnabled)
    {
        Mint.logException(e);
    }
}
 
开发者ID:GNUDimarik,项目名称:evercam-play-android2,代码行数:8,代码来源:ParentActivity.java

示例10: disposeBilling

import com.splunk.mint.Mint; //导入方法依赖的package包/类
/**
 * Releases billing service.
 *
 * @see #initBilling()
 */
private void disposeBilling() {
	try {
		if (mHelper != null) {
			mHelper.dispose();
			mHelper = null;
		}
	} catch (Exception e) {
		Mint.logException(e);
		mHelper = null;
	}
}
 
开发者ID:kozaxinan,项目名称:OnePlus-One-Screen-Fix,代码行数:17,代码来源:DonationFragment.java

示例11: disposeBilling

import com.splunk.mint.Mint; //导入方法依赖的package包/类
/**
 * Releases billing service.
 */
public void disposeBilling() {
    try {
        if (mHelper != null) {
            mHelper.dispose();
            mHelper = null;
        }
    } catch (Exception e) {
        Mint.logException(e);
        mHelper = null;
    }
}
 
开发者ID:kozaxinan,项目名称:OnePlus-One-Screen-Fix,代码行数:15,代码来源:InAppUtils.java

示例12: clearMap

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public void clearMap() {
    try {
        mapFragment.clearMarkers();
        mapFragment.updateMap();
    } catch (NullPointerException npe) {
        Mint.logException(npe);
    }
}
 
开发者ID:mapzen,项目名称:open,代码行数:9,代码来源:PagerResultsFragment.java

示例13: markReadyForUpload

import com.splunk.mint.Mint; //导入方法依赖的package包/类
private void markReadyForUpload() {
    if (db == null) {
        return;
    }

    ContentValues cv = new ContentValues();
    cv.put(DatabaseHelper.COLUMN_READY_FOR_UPLOAD, 1);
    try {
        db.update(TABLE_GROUPS, cv, COLUMN_TABLE_ID + " = ?",
                new String[] { groupId });
    } catch (IllegalStateException e) {
        Mint.logException(e);
    }
}
 
开发者ID:mapzen,项目名称:open,代码行数:15,代码来源:RouteFragment.java

示例14: e

import com.splunk.mint.Mint; //导入方法依赖的package包/类
/**
 * Prints to the e stream of LogCat with information
 *
 * @param t The throwable to be passed on
 */
public static void e(Throwable t) {
    if (t instanceof Exception && !BuildConfig.DEBUG) {
        Mint.logException((Exception) t);
    }
    Log.e(tag, t.getMessage(), t);
}
 
开发者ID:gandulf,项目名称:DsaTab,代码行数:12,代码来源:Debug.java

示例15: getUnsentTrackers

import com.splunk.mint.Mint; //导入方法依赖的package包/类
public Payload getUnsentTrackers(long userId){
	String s = TRACKER_LOG_C_SUBMITTED + "=? AND " + TRACKER_LOG_C_USERID + "=? ";
	String[] args = new String[] { "0", String.valueOf(userId) };
	Cursor c = db.query(TRACKER_LOG_TABLE, null, s, args, null, null, null);
	c.moveToFirst();

	ArrayList<Object> sl = new ArrayList<Object>();
	while (!c.isAfterLast()) {
		TrackerLog so = new TrackerLog();
		String digest = c.getString(c.getColumnIndex(TRACKER_LOG_C_ACTIVITYDIGEST));
		so.setId(c.getLong(c.getColumnIndex(TRACKER_LOG_C_ID)));
		so.setDigest(digest);
		String content = "";
		try {
			JSONObject json = new JSONObject();
			json.put("data", c.getString(c.getColumnIndex(TRACKER_LOG_C_DATA)));
			json.put("tracker_date", c.getString(c.getColumnIndex(TRACKER_LOG_C_DATETIME)));
			json.put("completed", c.getInt(c.getColumnIndex(TRACKER_LOG_C_COMPLETED)));
			json.put("digest", (digest!=null) ? digest : "");
			Course m = this.getCourse(c.getLong(c.getColumnIndex(TRACKER_LOG_C_COURSEID)), userId);
			if (m != null){
				json.put("course", m.getShortname());
			}
			String trackerType = c.getString(c.getColumnIndex(TRACKER_LOG_C_TYPE));
			if (trackerType != null){
				json.put("type",trackerType);
			}
			content = json.toString();
		} catch (JSONException e) {
			Mint.logException(e);
			e.printStackTrace();
		}
		
		so.setContent(content);
		sl.add(so);
		c.moveToNext();
	}
	Payload p = new Payload(sl);
	c.close();
	
	return p;
}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:43,代码来源:DbHelper.java


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