use of com.android.tools.idea.diagnostics.crash.CrashReport in project android by JetBrains.
the class SubmitCrashReportTask method run.
@Override
public void run(@NotNull ProgressIndicator indicator) {
indicator.setIndeterminate(true);
CrashReport report = CrashReport.Builder.createForException(myThrowable).addProductData(getProductData()).build();
CompletableFuture<String> future = CrashReporter.getInstance().submit(report, true);
try {
// arbitrary limit, we don't really want an error report task to take longer
String token = future.get(20, TimeUnit.SECONDS);
myCallback.consume(token);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
myErrorCallback.consume(e);
}
}
Aggregations