List of usage examples for android.util Log e
public static int e(String tag, String msg, Throwable tr)
From source file:Main.java
public static void e(String tag, String msg, Throwable tr) { if (LOG_ENABLED) Log.e(tag, msg, tr); }
From source file:Main.java
/** * Log an error/*from w ww. ja v a 2s . co m*/ * @param message The message * @param throwable (optional) The cause ({@link Throwable}) */ public static void error(String message, Throwable... throwable) { if (throwable.length != 0) Log.e("ERROR", message, throwable[0]); else Log.e("ERROR", message); }
From source file:Main.java
public static void e(String tag, String message, Exception e) { if (DEBUG) { Log.e(tag, message, e); } }
From source file:Main.java
public static void e(String tag, String msg, Throwable tr) { if (isDebugging) { Log.e(tag, msg, tr); } }
From source file:Main.java
public static void e(String msg, Throwable tr) { if (DEBUG) { Log.e(eTag, msg, tr); } }
From source file:Main.java
public static void e(String tag, String message, Throwable throwable) { Log.e(tag, message, throwable); }
From source file:Main.java
public static long getAvailableSpace(File dir) { try {/*from w w w . j ava2s. c o m*/ final StatFs stats = new StatFs(dir.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); } catch (Throwable e) { Log.e("getAvailableSpace", e.getMessage(), e); return -1; } }
From source file:Main.java
private static Object getField(final Object obj, final String fieldName) { try {/* ww w. j a v a 2s .c om*/ Field f = obj.getClass().getField(fieldName); return f.get(obj); } catch (final Exception e) { Log.e(TAG, "Error getting field:", e); } return null; }
From source file:Main.java
/** * Send Log type error only if the signature is debug type * * @param tag String Tag name/* ww w. j ava2s . com*/ * @param msg message to send * @param ex Throwable exception to send stackTrace */ public static void exception(String tag, String msg, Throwable ex) { Log.e(tag, msg, ex); }
From source file:Main.java
public static double str2num(String s, double defVal) { if (s.equals("N/A")) return defVal; try {/*from w w w .java 2s . c o m*/ s = s.trim(); s = s.contains(" ") ? s.split(" ")[0] : s; return Double.parseDouble(s); } catch (Exception err) { Log.e("str2num", s, err); return defVal; } }