Add CrashReportingAttachmentsBuilder.forException()

R=brianwilkerson@google.com

Change-Id: I66793d61e02d25931d230e8b9e3541255ac6324a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149054
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov
2020-05-27 15:28:11 +00:00
committed by commit-bot@chromium.org
parent 10e8d5d1a6
commit 14f64f9db4
2 changed files with 15 additions and 2 deletions
@@ -264,8 +264,14 @@ class AnalysisServer extends AbstractAnalysisServer {
});
}, (exception, stackTrace) {
AnalysisEngine.instance.instrumentationService.logException(
FatalException('Failed to handle request: ${request.method}',
exception, stackTrace));
FatalException(
'Failed to handle request: ${request.method}',
exception,
stackTrace,
),
null,
crashReportingAttachmentsBuilder.forException(exception),
);
});
}
@@ -10,6 +10,13 @@ class CrashReportingAttachmentsBuilder {
static final CrashReportingAttachmentsBuilder empty =
CrashReportingAttachmentsBuilder();
/// Return attachments with information about the analysis exception.
List<InstrumentationServiceAttachment> forException(
Object exception,
) {
return const [];
}
/// Return attachments with information about the analysis exception.
List<InstrumentationServiceAttachment> forExceptionResult(
ExceptionResult result,