Skip to content

Commit

Permalink
Allow return error id
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirasawaSama committed Mar 9, 2023
1 parent decb532 commit ee1c818
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

group 'com.microsoft.appcenter'
version '1.0.5'
version '1.0.6'

java {
withSourcesJar()
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/microsoft/appcenter/crashes/Crashes.java
Original file line number Diff line number Diff line change
Expand Up @@ -1312,10 +1312,10 @@ private ErrorLogReport(ManagedErrorLog log, ErrorReport report) {
* @param thread Thread.
* @param attachments Optional attachments.
*/
public static void trackCrash(@NotNull Throwable throwable, @NotNull Thread thread, @Nullable Iterable<ErrorAttachmentLog> attachments) {
getInstance().queueCrash(throwable, thread, attachments);
public static UUID trackCrash(@NotNull Throwable throwable, @NotNull Thread thread, @Nullable Iterable<ErrorAttachmentLog> attachments) {
return getInstance().queueCrash(throwable, thread, attachments);
}
private synchronized void queueCrash(@NotNull final Throwable throwable, Thread thread, Iterable<ErrorAttachmentLog> attachments) {
private synchronized UUID queueCrash(@NotNull final Throwable throwable, Thread thread, Iterable<ErrorAttachmentLog> attachments) {
final UUID errorId = UUID.randomUUID();
post(() -> {
ManagedErrorLog errorLog = ErrorLogHelper.createErrorLog(mContext, thread,
Expand All @@ -1326,5 +1326,6 @@ private synchronized void queueCrash(@NotNull final Throwable throwable, Thread
/* Then attachments if any. */
if (attachments != null) sendErrorAttachment(errorId, attachments);
});
return errorId;
}
}

0 comments on commit ee1c818

Please sign in to comment.