mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 23:41:50 +00:00
Catch exceptions while preparing analysis.implemented notification.
This notification is sent often, and uses index and search engine. We have several exceptions in internal logs, and all there exceptions are fatal by default. It seems too harsh to shutdown the server because of a missing notification. R=brianwilkerson@google.com BUG= Review URL: https://codereview.chromium.org/2376493002 .
This commit is contained in:
parent
e9e6b331c3
commit
ef015221b1
|
@ -48,12 +48,19 @@ scheduleImplementedNotification(
|
|||
for (String file in files) {
|
||||
CompilationUnitElement unitElement = server.getCompilationUnitElement(file);
|
||||
if (unitElement != null) {
|
||||
ImplementedComputer computer =
|
||||
new ImplementedComputer(searchEngine, unitElement);
|
||||
await computer.compute();
|
||||
var params = new protocol.AnalysisImplementedParams(
|
||||
file, computer.classes, computer.members);
|
||||
server.sendNotification(params.toNotification());
|
||||
try {
|
||||
ImplementedComputer computer =
|
||||
new ImplementedComputer(searchEngine, unitElement);
|
||||
await computer.compute();
|
||||
var params = new protocol.AnalysisImplementedParams(
|
||||
file, computer.classes, computer.members);
|
||||
server.sendNotification(params.toNotification());
|
||||
} catch (exception, stackTrace) {
|
||||
server.sendServerErrorNotification(
|
||||
'Failed to send analysis.implemented notification.',
|
||||
exception,
|
||||
stackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue