Skip to content

Commit a524036

Browse files
committed
Track which error reports are created automatically (#59)
2 parents 257f5d4 + 84819c8 commit a524036

File tree

439 files changed

+9749
-16611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

439 files changed

+9749
-16611
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 3.5.0 (2017-02-10)
4+
5+
* Track whether an error is handled or unhandled
6+
7+
* Update native libraries
8+
39
## 3.4.0 (2017-19-09)
410

511
### Enhancements

Rakefile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,19 @@ task :create_ios_plugin do
8686
mkdir_p ios_dir
8787

8888
# Copy iOS bugsnag notifier and KSCrash directory files
89-
kscrash_dir = "bugsnag-cocoa/Carthage/Checkouts/KSCrash/Source/KSCrash/"
90-
recording_path = kscrash_dir + "Recording"
91-
swift_path = kscrash_dir + "swift"
92-
llvm_path = kscrash_dir + "llvm"
9389
bugsnag_path = "bugsnag-cocoa/Source"
94-
`find #{recording_path} #{swift_path} #{llvm_path} #{bugsnag_path} -name '*.m' -or -name '*.c' -or -name '*.mm' -or -name '*.h' -or -name '*.cpp'`.split("\n").each do |x|
95-
cp x, ios_dir
96-
end
90+
kscrash_dir = "bugsnag-cocoa/Source/KSCrash/Source/KSCrash/"
91+
recording_path = kscrash_dir + "Recording"
92+
reporting_path = kscrash_dir + "Reporting"
9793

9894
# Copy over basic additional KSCrash reporting files
95+
recording_sentry_path = kscrash_dir + "Recording/Sentry"
96+
recording_tools_path = kscrash_dir + "Recording/Tools"
9997
kscrash_filter_path = kscrash_dir + "Reporting/Filters/"
100-
cp kscrash_filter_path + "Tools/KSVarArgs.h", ios_dir
101-
cp kscrash_filter_path + "Tools/Container+DeepSearch.h", ios_dir
102-
cp kscrash_filter_path + "Tools/Container+DeepSearch.m", ios_dir
103-
cp kscrash_filter_path + "KSCrashReportFilter.h", ios_dir
104-
cp kscrash_filter_path + "KSCrashReportFilter.m", ios_dir
98+
99+
`find #{recording_path} #{reporting_path} #{bugsnag_path} #{recording_sentry_path} #{recording_tools_path} #{kscrash_filter_path} -name '*.m' -or -name '*.c' -or -name '*.mm' -or -name '*.h' -or -name '*.cpp'`.split("\n").each do |x|
100+
cp x, ios_dir
101+
end
105102

106103
# Copy unity to bugsnag-cocoa wrapper
107104
cp "src/BugsnagUnity.mm", ios_dir
@@ -134,7 +131,7 @@ task :create_android_plugin do
134131
sh "../bugsnag-android/gradlew clean build"
135132
end
136133

137-
cp "bugsnag-android/build/outputs/aar/bugsnag-android-release.aar", android_dir
134+
cp "bugsnag-android/sdk/build/outputs/aar/sdk-release.aar", android_dir
138135
cp "bugsnag-android-unity/build/outputs/aar/bugsnag-android-unity-release.aar", android_dir
139136
end
140137

bugsnag-android

Submodule bugsnag-android updated 124 files

bugsnag-android-unity/build.gradle

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1+
ext {
2+
supportLibVersion = "25.3.1"
3+
supportTestVersion = "0.5"
4+
espressoVersion = "2.2.2"
5+
junitVersion = "4.12"
6+
mockitoVersion = "1.10.19"
7+
kotlin_version = '1.1.3-2'
8+
}
9+
110
buildscript {
211
repositories {
312
jcenter()
413
}
514

615
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.3.1'
16+
classpath 'com.android.tools.build:gradle:2.3.3'
817
}
918
}
1019

1120
apply plugin: 'com.android.library'
1221
android {
13-
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
22+
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
1423
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
1524

1625
defaultConfig {
17-
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
18-
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
26+
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
27+
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
1928
}
2029
}
2130

2231
dependencies {
23-
compile project(':bugsnag-android')
32+
compile project(':sdk')
2433
}

bugsnag-android-unity/gradle.properties

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@ POM_URL=https://bugsnag.com
66
POM_ARTIFACT_ID=bugsnag-android-unity
77
POM_PACKAGING=aar
88

9-
ANDROID_BUILD_TARGET_SDK_VERSION=21
10-
ANDROID_BUILD_TOOLS_VERSION=25.0.2
11-
ANDROID_BUILD_SDK_VERSION=25
12-
ANDROID_BUILD_MIN_SDK_VERSION=4
9+
VERSION_NAME=4.0.0
10+
POM_SCM_URL=https://github.com/bugsnag/bugsnag-android
11+
POM_SCM_CONNECTION=scm:git@github.com:bugsnag/bugsnag-android.git
12+
POM_SCM_DEV_CONNECTION=scm:git@github.com:bugsnag/bugsnag-android.git
13+
POM_LICENCE_NAME=MIT
14+
POM_LICENCE_URL=http://opensource.org/licenses/MIT
15+
POM_LICENCE_DIST=repo
16+
POM_DEVELOPER_ID=loopj
17+
POM_DEVELOPER_NAME=James Smith
18+
POM_DEVELOPER_EMAIL=james@bugsnag.com
19+
ANDROID_MIN_SDK_VERSION=14
20+
ANDROID_TARGET_SDK_VERSION=26
21+
ANDROID_BUILD_TOOLS_VERSION=26.0.1
22+
ANDROID_COMPILE_SDK_VERSION=26

bugsnag-android-unity/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include ':bugsnag-android'
2-
project(':bugsnag-android').projectDir = new File(rootProject.projectDir, '../bugsnag-android')
1+
include ':sdk'
2+
project(':sdk').projectDir = new File(rootProject.projectDir, '../bugsnag-android/sdk')

bugsnag-android-unity/src/main/java/com/bugsnag/android/unity/UnityCallback.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ class UnityCallback implements Callback {
99
static final String NOTIFIER_VERSION = "3.4.0";
1010
static final String NOTIFIER_URL = "https://github.com/bugsnag/bugsnag-unity";
1111

12-
private final Severity severity;
1312
private final String context;
1413
private final String logLevel;
1514

16-
UnityCallback(String context, Severity severity, String logLevel) {
15+
UnityCallback(String context, String logLevel) {
1716
this.context = context;
18-
this.severity = severity;
1917
this.logLevel = logLevel;
2018
}
2119

@@ -26,12 +24,14 @@ public void beforeNotify(Report report) {
2624
report.setNotifierVersion(NOTIFIER_VERSION);
2725

2826
com.bugsnag.android.Error error = report.getError();
29-
error.setSeverity(severity);
3027
MetaData metadata = error.getMetaData();
3128
metadata.addToTab("Unity", "unityException", "true");
32-
if (logLevel != null && logLevel.length() > 0)
29+
30+
if (logLevel != null && logLevel.length() > 0) {
3331
metadata.addToTab("Unity", "unityLogLevel", logLevel);
34-
if (context != null && context.length() > 0)
32+
}
33+
if (context != null && context.length() > 0) {
3534
error.setContext(context);
35+
}
3636
}
3737
}

bugsnag-android-unity/src/main/java/com/bugsnag/android/unity/UnityClient.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.bugsnag.android.unity;
22

33
import java.lang.String;
4+
import java.util.Map;
5+
import java.util.HashMap;
46

57
import android.content.Context;
68

@@ -12,8 +14,18 @@ public static void init(Context androidContext, String apiKey) {
1214
Bugsnag.init(androidContext, apiKey);
1315
}
1416

15-
public static void notify(String name, String message, String context, StackTraceElement[] stacktrace, Severity severity, String logLevel) {
16-
Bugsnag.notify(name, message, stacktrace, new UnityCallback(context, severity, logLevel));
17+
public static void notify(String name, String message,
18+
String context, StackTraceElement[] stacktrace,
19+
Severity severity, String logLevel,
20+
String severityReason) {
21+
Throwable t = new BugsnagException(name, message, stacktrace);
22+
23+
Map<String, Object> data = new HashMap<>();
24+
data.put("severity", severity.getName());
25+
data.put("severityReason", severityReason);
26+
data.put("logLevel", logLevel);
27+
28+
Bugsnag.getClient().internalClientNotify(t, data, false, new UnityCallback(context, logLevel));
1729
}
18-
}
1930

31+
}

bugsnag-cocoa

Submodule bugsnag-cocoa updated 194 files

0 commit comments

Comments
 (0)