Search in sources :

Example 1 with CrashReport

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);
    }
}
Also used : CrashReport(com.android.tools.idea.diagnostics.crash.CrashReport) ExecutionException(java.util.concurrent.ExecutionException) TimeoutException(java.util.concurrent.TimeoutException)

Aggregations

CrashReport (com.android.tools.idea.diagnostics.crash.CrashReport)1 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)1