Skip to content

Commit

Permalink
Set crash id before reporting it
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitsing committed Jul 4, 2017
1 parent 001816c commit 1251c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ private static void analyzeAndReportCrash(Throwable throwable) {
Log.d(TAG, "Analyzing Crash...");
CrashAnalyzer crashAnalyzer = new CrashAnalyzer(throwable);
Crash crash = crashAnalyzer.getAnalysis();
instance.database.insertCrash(CrashRecord.createFrom(crash));
int crashId = instance.database.insertCrash(CrashRecord.createFrom(crash));
crash.setId(crashId);
instance.crashReporter.report(new CrashViewModel(crash));
Log.d(TAG, "Crash analysis completed!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,8 @@ public int getId() {
public Date getDate() {
return date;
}

public void setId(int id) {
this.id = id;
}
}

0 comments on commit 1251c37

Please sign in to comment.