mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: throw error for getLastCrashReport if crashReporter not started (#21685)
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user