public String getDebugReport(Throwable aException) {
		NumberFormat theFormatter = new DecimalFormat("#0.");
		String theErrReport = "";

		theErrReport += mApp.getPackageName() + " generated the following exception:\n";
		theErrReport += aException.toString() + "\n\n";

		// stack trace
		StackTraceElement[] theStackTrace = aException.getStackTrace();
		if (theStackTrace.length > 0) {
			theErrReport += "--------- Stack trace ---------\n";
			for (int i = 0; i < theStackTrace.length; i++) {
				theErrReport += theFormatter.format(i + 1) + "\t" + theStackTrace[i].toString()
						+ "\n";
			}// for
			theErrReport += "-------------------------------\n\n";
		}

		// if the exception was thrown in a background thread inside
		// AsyncTask, then the actual exception can be found with getCause
		Throwable theCause = aException.getCause();
		if (theCause != null) {
			theErrReport += "----------- Cause -----------\n";
			theErrReport += theCause.toString() + "\n\n";
			theStackTrace = theCause.getStackTrace();
			for (int i = 0; i < theStackTrace.length; i++) {
				theErrReport += theFormatter.format(i + 1) + "\t" + theStackTrace[i].toString()
						+ "\n";
			}// for
			theErrReport += "-----------------------------\n\n";
		}// if

		// app environment
		PackageManager pm = mApp.getPackageManager();
		PackageInfo pi;
		try {
			pi = pm.getPackageInfo(mApp.getPackageName(), 0);
		} catch (NameNotFoundException eNnf) {
			// doubt this will ever run since we want info about our own package
			pi = new PackageInfo();
			pi.versionName = "unknown";
			pi.versionCode = 69;
		}
		Date theDate = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd_HH.mm.ss_zzz");
		theErrReport += "-------- Environment --------\n";
		theErrReport += "Time\t=" + sdf.format(theDate) + "\n";
		theErrReport += "Device\t=" + Build.FINGERPRINT + "\n";
		try {
			Field theMfrField = Build.class.getField("MANUFACTURER");
			theErrReport += "Make\t=" + theMfrField.get(null) + "\n";
		} catch (SecurityException e) {
		} catch (NoSuchFieldException e) {
		} catch (IllegalArgumentException e) {
		} catch (IllegalAccessException e) {
		}
		theErrReport += "Model\t=" + Build.MODEL + "\n";
		theErrReport += "Product\t=" + Build.PRODUCT + "\n";
		theErrReport += "App\t\t=" + mApp.getPackageName() + ", version " + pi.versionName
				+ " (build " + pi.versionCode + ")\n";
		theErrReport += "Locale=" + mApp.getResources().getConfiguration().locale.getDisplayName()
				+ "\n";
		theErrReport += "-----------------------------\n\n";

		theErrReport += "END REPORT.";
		return theErrReport;
	}