diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart index 4cd286be1c4..6de618f8c31 100644 --- a/pkg/analysis_server/lib/src/analysis_server.dart +++ b/pkg/analysis_server/lib/src/analysis_server.dart @@ -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), + ); }); } diff --git a/pkg/analysis_server/lib/src/server/crash_reporting_attachments.dart b/pkg/analysis_server/lib/src/server/crash_reporting_attachments.dart index 281c6d2fa16..0648968bbcf 100644 --- a/pkg/analysis_server/lib/src/server/crash_reporting_attachments.dart +++ b/pkg/analysis_server/lib/src/server/crash_reporting_attachments.dart @@ -10,6 +10,13 @@ class CrashReportingAttachmentsBuilder { static final CrashReportingAttachmentsBuilder empty = CrashReportingAttachmentsBuilder(); + /// Return attachments with information about the analysis exception. + List forException( + Object exception, + ) { + return const []; + } + /// Return attachments with information about the analysis exception. List forExceptionResult( ExceptionResult result,