Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: pkg/analysis_server/lib/src/operation/operation_analysis.dart

Issue 1168473003: Issue 23573. Catch exception during indexing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clean index information for the current Dart unit on exception. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index_contributor.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library operation.analysis; 5 library operation.analysis;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/computer/computer_highlights.dart'; 8 import 'package:analysis_server/src/computer/computer_highlights.dart';
9 import 'package:analysis_server/src/computer/computer_navigation.dart'; 9 import 'package:analysis_server/src/computer/computer_navigation.dart';
10 import 'package:analysis_server/src/computer/computer_occurrences.dart'; 10 import 'package:analysis_server/src/computer/computer_occurrences.dart';
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 : super(context, file); 319 : super(context, file);
320 320
321 @override 321 @override
322 ServerOperationPriority get priority { 322 ServerOperationPriority get priority {
323 return ServerOperationPriority.ANALYSIS_INDEX; 323 return ServerOperationPriority.ANALYSIS_INDEX;
324 } 324 }
325 325
326 @override 326 @override
327 void perform(AnalysisServer server) { 327 void perform(AnalysisServer server) {
328 ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() { 328 ServerPerformanceStatistics.indexOperation.makeCurrentWhile(() {
329 Index index = server.index; 329 try {
330 index.indexUnit(context, unit); 330 Index index = server.index;
331 index.indexUnit(context, unit);
332 } catch (exception, stackTrace) {
333 server.sendServerErrorNotification(exception, stackTrace);
334 }
331 }); 335 });
332 } 336 }
333 } 337 }
334 338
335 class _DartNavigationOperation extends _DartNotificationOperation { 339 class _DartNavigationOperation extends _DartNotificationOperation {
336 _DartNavigationOperation( 340 _DartNavigationOperation(
337 AnalysisContext context, String file, CompilationUnit unit) 341 AnalysisContext context, String file, CompilationUnit unit)
338 : super(context, file, unit); 342 : super(context, file, unit);
339 343
340 @override 344 @override
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 abstract class _SingleFileOperation extends SourceSensitiveOperation { 434 abstract class _SingleFileOperation extends SourceSensitiveOperation {
431 final String file; 435 final String file;
432 436
433 _SingleFileOperation(AnalysisContext context, this.file) : super(context); 437 _SingleFileOperation(AnalysisContext context, this.file) : super(context);
434 438
435 @override 439 @override
436 bool shouldBeDiscardedOnSourceChange(Source source) { 440 bool shouldBeDiscardedOnSourceChange(Source source) {
437 return source.fullName == file; 441 return source.fullName == file;
438 } 442 }
439 } 443 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/index/index_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698