| Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| index 78939c562c35d2b1b414a09ecedb1bc469155f60..f0e2c0a2ea8238fea80f5d5c9502787a88ec1ba4 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| @@ -69,9 +69,13 @@ class DartFixContextImpl extends FixContextImpl implements DartFixContext {
|
| */
|
| class DefaultFixContributor extends DartFixContributor {
|
| @override
|
| - Future<List<Fix>> internalComputeFixes(DartFixContext context) {
|
| - FixProcessor processor = new FixProcessor(context);
|
| - return processor.compute();
|
| + Future<List<Fix>> internalComputeFixes(DartFixContext context) async {
|
| + try {
|
| + FixProcessor processor = new FixProcessor(context);
|
| + return processor.compute();
|
| + } on CancelCorrectionException {
|
| + return Fix.EMPTY_LIST;
|
| + }
|
| }
|
| }
|
|
|
| @@ -135,7 +139,12 @@ class FixProcessor {
|
| String get eol => utils.endOfLine;
|
|
|
| Future<List<Fix>> compute() async {
|
| - utils = new CorrectionUtils(unit);
|
| + try {
|
| + utils = new CorrectionUtils(unit);
|
| + } catch (e) {
|
| + throw new CancelCorrectionException(exception: e);
|
| + }
|
| +
|
| errorOffset = error.offset;
|
| errorLength = error.length;
|
| errorEnd = errorOffset + errorLength;
|
|
|