aboutsummaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-06-27 19:23:30 +0000
committerKenny Root <kenny@the-b.org>2009-06-27 19:23:30 +0000
commitcf0a345033e1fdd2d778f10dd2eb07d31033838d (patch)
tree1b93972f5b583d4e95e0d2634ab05d723d8f051b /src/com
parentb07ebdddaee01ce3c450ba74f0c866152c4fe634 (diff)
downloadconnectbot-cf0a345033e1fdd2d778f10dd2eb07d31033838d.tar.gz
connectbot-cf0a345033e1fdd2d778f10dd2eb07d31033838d.tar.bz2
connectbot-cf0a345033e1fdd2d778f10dd2eb07d31033838d.zip
Add in build information for exception reporting
git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@342 df292f66-193f-0410-a5fc-6d59da041ff2
Diffstat (limited to 'src/com')
-rw-r--r--src/com/nullwire/trace/DefaultExceptionHandler.java3
-rw-r--r--src/com/nullwire/trace/ExceptionHandler.java4
-rw-r--r--src/com/nullwire/trace/G.java3
3 files changed, 8 insertions, 2 deletions
diff --git a/src/com/nullwire/trace/DefaultExceptionHandler.java b/src/com/nullwire/trace/DefaultExceptionHandler.java
index e475888..7ca04e8 100644
--- a/src/com/nullwire/trace/DefaultExceptionHandler.java
+++ b/src/com/nullwire/trace/DefaultExceptionHandler.java
@@ -31,6 +31,9 @@ public class DefaultExceptionHandler implements UncaughtExceptionHandler {
// Write the stacktrace to disk
BufferedWriter bos = new BufferedWriter(new FileWriter(G.FILES_PATH
+ "/" + filename + ".stacktrace"));
+ bos.write(G.APP_VERSION);
+ bos.write(G.APP_DESCRIPTION);
+ bos.write('\n');
bos.write(result.toString());
bos.flush();
// Close up everything
diff --git a/src/com/nullwire/trace/ExceptionHandler.java b/src/com/nullwire/trace/ExceptionHandler.java
index ff29724..a48303d 100644
--- a/src/com/nullwire/trace/ExceptionHandler.java
+++ b/src/com/nullwire/trace/ExceptionHandler.java
@@ -56,9 +56,11 @@ public class ExceptionHandler {
PackageInfo pi;
// Version
pi = pm.getPackageInfo(context.getPackageName(), 0);
- G.APP_VERSION = pi.versionName;
// Package name
G.APP_PACKAGE = pi.packageName;
+ // Version information
+ G.APP_VERSION = pi.versionName;
+ G.APP_DESCRIPTION = context.getString(R.string.msg_version);
// Files dir for storing the stack traces
G.FILES_PATH = context.getFilesDir().getAbsolutePath();
} catch (NameNotFoundException e) {
diff --git a/src/com/nullwire/trace/G.java b/src/com/nullwire/trace/G.java
index d803a05..cf38f9b 100644
--- a/src/com/nullwire/trace/G.java
+++ b/src/com/nullwire/trace/G.java
@@ -4,8 +4,9 @@ public class G {
// This must be set by the application - it used to automatically
// transmit exceptions to the trace server
public static String FILES_PATH = null;
- public static String APP_VERSION = "unknown";
public static String APP_PACKAGE = "unknown";
+ public static String APP_VERSION = "unknown";
+ public static String APP_DESCRIPTION = "unknown";
// Where are the stack traces posted?
public static String URL = "http://connectbot.the-b.org/trace/";
}