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

Side by Side Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 816103002: Add InstrumentationService.logPriorityException() and use logException() in refactorings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
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 edit.domain; 5 library edit.domain;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/collections.dart'; 10 import 'package:analysis_server/src/collections.dart';
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return _sendResultResponse(); 287 return _sendResultResponse();
288 } 288 }
289 // create change 289 // create change
290 return refactoring.createChange().then((change) { 290 return refactoring.createChange().then((change) {
291 result.change = change; 291 result.change = change;
292 result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds); 292 result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds);
293 return _sendResultResponse(); 293 return _sendResultResponse();
294 }); 294 });
295 }); 295 });
296 }).catchError((exception, stackTrace) { 296 }).catchError((exception, stackTrace) {
297 _reset(); 297 server.instrumentationService.logException(exception, stackTrace);
298 server.sendResponse( 298 server.sendResponse(
299 new Response.serverError(request, exception, stackTrace)); 299 new Response.serverError(request, exception, stackTrace));
300 _reset();
300 }); 301 });
301 } 302 }
302 303
303 /** 304 /**
304 * Initializes this context to perform a refactoring with the specified 305 * Initializes this context to perform a refactoring with the specified
305 * parameters. The existing [Refactoring] is reused or created as needed. 306 * parameters. The existing [Refactoring] is reused or created as needed.
306 */ 307 */
307 Future<RefactoringStatus> _init(RefactoringKind kind, String file, int offset, 308 Future<RefactoringStatus> _init(RefactoringKind kind, String file, int offset,
308 int length) { 309 int length) {
309 // check if we can continue with the existing Refactoring instance 310 // check if we can continue with the existing Refactoring instance
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } 517 }
517 if (refactoring is RenameRefactoring) { 518 if (refactoring is RenameRefactoring) {
518 RenameRefactoring renameRefactoring = refactoring; 519 RenameRefactoring renameRefactoring = refactoring;
519 RenameOptions renameOptions = params.options; 520 RenameOptions renameOptions = params.options;
520 renameRefactoring.newName = renameOptions.newName; 521 renameRefactoring.newName = renameOptions.newName;
521 return renameRefactoring.checkNewName(); 522 return renameRefactoring.checkNewName();
522 } 523 }
523 return new RefactoringStatus(); 524 return new RefactoringStatus();
524 } 525 }
525 } 526 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698