Improved debugging

This commit is contained in:
fkloft 2014-02-23 14:28:42 +01:00
parent 4ef7c41a0a
commit 9aadef1e2a
2 changed files with 8 additions and 6 deletions

View File

@ -77,7 +77,7 @@ public final class Log {
}
public static void d(final Throwable tr) {
d("Unexpected " + tr, tr);
d("Unexpected " + tr.getClass().getCanonicalName(), tr);
}
public static void e(final String msg) {
@ -107,7 +107,7 @@ public final class Log {
}
public static void e(final Throwable tr) {
e("Unexpected " + tr, tr);
e("Unexpected " + tr.getClass().getCanonicalName(), tr);
}
public static void i(final String msg) {
@ -137,7 +137,7 @@ public final class Log {
}
public static void i(final Throwable tr) {
i("Unexpected " + tr, tr);
i("Unexpected " + tr.getClass().getCanonicalName(), tr);
}
public static boolean log(final ConsoleMessage message) {
@ -211,7 +211,7 @@ public final class Log {
}
public static void v(final Throwable tr) {
v("Unexpected " + tr, tr);
v("Unexpected " + tr.getClass().getCanonicalName(), tr);
}
public static void w(final String msg) {
@ -241,7 +241,7 @@ public final class Log {
}
public static void w(final Throwable tr) {
w("Unexpected " + tr, tr);
w("Unexpected " + tr.getClass().getCanonicalName(), tr);
}
private Log() {

View File

@ -37,7 +37,9 @@ public class IntentGenerator {
public static String getTitle(final Intent intent) throws IllegalArgumentException {
if (intent.hasExtra(EXTRA_FLAG_TITLE)) return intent.getStringExtra(EXTRA_FLAG_TITLE);
throw new IllegalArgumentException("Got an intent not generated by IntentGenerator");
throw new IllegalArgumentException("Got an intent not generated by IntentGenerator!\n"
+ "Intent:\n" + intent.toString() + "\n"
+ "Extras:\n" + intent.getExtras().toString());
}
public static boolean isDefault(final Intent intent) {