Skip to content

Commit

Permalink
refactor: throw error for getLastCrashReport if crashReporter not sta…
Browse files Browse the repository at this point in the history
…rted (#21683)
  • Loading branch information
trop[bot] authored and codebytere committed Jan 7, 2020
1 parent e0576ef commit 32b51bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/common/crash-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ class CrashReporter {
}

getUploadedReports () {
return binding.getUploadedReports(this.getCrashesDirectory())
const crashDir = this.getCrashesDirectory()
if (!crashDir) {
throw new Error('crashReporter has not been started')
}

return binding.getUploadedReports(crashDir)
}

getCrashesDirectory () {
Expand Down

0 comments on commit 32b51bc

Please sign in to comment.