Skip to content

Commit

Permalink
Merge pull request #219 from microsoft/v-ankubo/save-error-report
Browse files Browse the repository at this point in the history
Mark crashReportPath method as public
  • Loading branch information
Anastasia Senyushina authored Oct 25, 2021
2 parents 0673cd4 + 211f646 commit 5999269
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# PLCrashReporter Change Log

## Version 1.10.1(Under development)
## Version 1.10.1 (Under development)

* **[Improvement]** Specified minimum cocoapods version in podspec to 1.10.0
* **[Improvement]** Mark `PLCrashReporter.crashReportPath` method as public.

___

Expand Down
5 changes: 5 additions & 0 deletions Source/PLCrashReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ typedef struct PLCrashReporterCallbacks {

- (void) setCrashCallbacks: (PLCrashReporterCallbacks *) callbacks;

/**
* Return the path to live crash report (which may not yet, or ever, exist).
*/
- (NSString *) crashReportPath;

/**
* Custom data to save in the crash report.
*/
Expand Down
15 changes: 4 additions & 11 deletions Source/PLCrashReporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ - (plcrash_async_symbol_strategy_t) mapToAsyncSymbolicationStrategy: (PLCrashRep
- (BOOL) populateCrashReportDirectoryAndReturnError: (NSError **) outError;
- (NSString *) crashReportDirectory;
- (NSString *) queuedCrashReportDirectory;
- (NSString *) crashReportPath;

@end

Expand Down Expand Up @@ -844,6 +843,10 @@ - (void) setCustomData: (NSData *) customData {
plcrash_log_writer_set_custom_data(&signal_handler_context.writer, customData);
}

- (NSString *) crashReportPath {
return [[self crashReportDirectory] stringByAppendingPathComponent: PLCRASH_LIVE_CRASHREPORT];
}

@end

/**
Expand Down Expand Up @@ -1061,14 +1064,4 @@ - (NSString *) queuedCrashReportDirectory {
return [[self crashReportDirectory] stringByAppendingPathComponent: PLCRASH_QUEUED_DIR];
}


/**
* Return the path to live crash report (which may not yet, or ever, exist).
*/
- (NSString *) crashReportPath {
return [[self crashReportDirectory] stringByAppendingPathComponent: PLCRASH_LIVE_CRASHREPORT];
}



@end

0 comments on commit 5999269

Please sign in to comment.