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

@ -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) {