Log e - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Log e method.

This code example shows how to use the following methods:e, getMessage
		Log.e(TAG, e.getMessage(), e);
	} 
 
	@Override 
	public void onMalformedURLException(MalformedURLException e, final Object state) {
		Log.e(TAG, e.getMessage(), e);
	} 
} 
8
CodeRank
This code example shows how to use the following methods:getMessage
                Uri uri = Uri.parse(niceUrl);
                InputStream stream = assets.open(uri.getPath(), AssetManager.ACCESS_STREAMING);
                WebResourceResponse response = new WebResourceResponse(mimetype, "UTF-8", stream);
                return response;
            } catch (IOException e) {
                LOG.e("generateWebResourceResponse", e.getMessage(), e);
            } 
        } 
        return null; 
    } 
     
} 
7
CodeRank
This code example shows how to use the following methods:e, getMessage
		FacebookEvents.onPostPublishingFailed(); 
	} 
 
	@Override 
	public void onMalformedURLException(MalformedURLException e, final Object state) {
		Log.e(TAG, e.getMessage(), e);
		FacebookEvents.onPostPublishingFailed(); 
	} 
} 
8
CodeRank
This code example shows how to use the following methods:e, getMessage
        JSONObject obj = new JSONObject();
        try { 
            obj.put("level", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_LEVEL, 0));
            obj.put("isPlugged", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_PLUGGED, -1) > 0 ? true : false);
        } catch (JSONException e) {
            Log.e(LOG_TAG, e.getMessage(), e);
        } 
        return obj;
    } 
 
    /** 
     * Updates the JavaScript side whenever the battery changes 
     * 
     * @param batteryIntent the current battery information 
     * @return 
     */ 
    private void updateBatteryInfo(Intent batteryIntent) {
        sendUpdate(this.getBatteryInfo(batteryIntent), true);
    } 
 
7
CodeRank
This code example shows how to use the following methods:e
            throw new DataException(e);
        } catch (SAXException e) {
            Log.e(TAG, "SAXException", e);
            throw new DataException(e);
        } catch (IOException e) {
            Log.e(TAG, "IOException", e);
            throw new DataException(e);
        } 
        return parser.mPersonList;
    } 
 
    private static class PersonHandler extends DefaultHandler {
 
        private StringBuilder mSb = new StringBuilder();
        public ArrayList<Person> mPersonList = new ArrayList<Person>();
        public Person mCurrentPerson = null;
 
        @Override 
        public void startElement(String namespaceURI, String localName, String qName,
                Attributes atts) throws SAXException {
7
CodeRank
This code example shows how to use the following methods:e, getLocalizedMessage
This code example shows how to use the following methods:e, getMessage
        // Forbidden being instantiated. 
    } 
 
    // FIXME: need to optimize this method. 
    private static boolean isLowMemory(SQLiteException e) {
        return e.getMessage().equals(SQLITE_EXCEPTION_DETAIL_MESSAGE);
    } 
 
    public static void checkSQLiteException(Context context, SQLiteException e) {
        if (isLowMemory(e)) {
            Toast.makeText(context, "Low Memory",
                    Toast.LENGTH_SHORT).show();
        } else { 
            throw e;
        } 
    } 
 
    public static Cursor query(Context context, ContentResolver resolver, Uri uri,
            String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        try { 

6
CodeRank
This code example shows how to use the following methods:e, printStackTrace, toString
This code example shows how to use the following methods:e
      this.prepareClient();
    } catch (KeyManagementException e) {
      Log.e(LOG_TAG, "Couldn't prepare client.", e);
      delegate.handleTransportException(e);
    } catch (NoSuchAlgorithmException e) {
      Log.e(LOG_TAG, "Couldn't prepare client.", e);
      delegate.handleTransportException(e);
    } 
    this.execute();
  } 
 
  @Override 
  public void get() { 
    Log.i(LOG_TAG, "HTTP GET " + this.uri.toASCIIString());
    this.go(new HttpGet(this.uri));
  } 
 
  @Override 
  public void delete() { 
    Log.i(LOG_TAG, "HTTP DELETE " + this.uri.toASCIIString());
6
CodeRank
This code example shows how to use the following methods:toString
			m.obj = e.toString();
			Log.e(TAG, "Exception on opening Input Stream", e);
		} 
		catch (ParserConfigurationException e)
		{ 
			m.obj = e.toString();
			Log.e(TAG, "Exception on parsing XML File", e);
		} 
		catch (SAXException e)
		{ 
			m.obj = e.toString();
			Log.e(TAG, "Exception while creating SAXParser", e);
		} 
		ThemeListActivity.FeaturedThemesProgressHandler.sendMessage(m);
	} 
} 
6
CodeRank

Related Log e Questions & Answers:

Other Log e Examples

31:	
32:	    } else {
33:	      Log.e("Compass MainActivity", "Registerered for ORIENTATION Sensor");
34:	      Toast.makeText(this, "ORIENTATION Sensor not found",
35:	          Toast.LENGTH_LONG).show();

Read More

41:	      audiofile = File.createTempFile("sound", ".3gp", sampleDir);
42:	    } catch (IOException e) {
43:	      Log.e(TAG, "sdcard access error");
44:	      return;
45:	    }

Read More

5:	    throw new RuntimeException("File not found");
6:	  }
7:	  Log.e("Testing", "Starting to read");
8:	  BufferedReader reader = null;
9:	  try {

Read More

57:						.getJSONFromUrl("http://api.androidhive.info/game/game_stats.json");
58:	
59:				Log.e("Response: ", "> " + json);
60:	
61:				if (json != null) {
-
66:						earned = jObj.getString("earned");
67:	
68:						Log.e("JSON", "> " + now_playing + earned);
69:	
70:					} catch (JSONException e) {

Read More

180:			return rss_url;
181:		}
182:	
183:		/**
184:		 * Method to get xml content from url HTTP Get request
-
183:		/**
184:		 * Method to get xml content from url HTTP Get request
185:		 * */
186:		public String getXmlFromUrl(String url) {
187:			String xml = null;
-
186:		public String getXmlFromUrl(String url) {
187:			String xml = null;
188:	
189:			try {
190:				// request method is GET

Read More

198:			} else {
199:				// error in creating fragment
200:				Log.e("MainActivity", "Error in creating fragment");
201:			}
202:		}

Read More

e Method Overview
Send an ERROR log message.
See Code Examples for other Android Log Methods: