mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:29:47 +00:00
Guard the fix code against file system exceptions
R=devoncarew@google.com Review-Url: https://codereview.chromium.org/2997153002 .
This commit is contained in:
parent
bf7d6530b4
commit
4076ef910f
|
@ -809,10 +809,15 @@ class FixProcessor {
|
|||
if (library != null) {
|
||||
targetUnit = library.definingCompilationUnit;
|
||||
Source targetSource = targetUnit.source;
|
||||
offset = targetSource.contents.data.length;
|
||||
filePath = targetSource.fullName;
|
||||
prefix = '$eol';
|
||||
suffix = '$eol';
|
||||
try {
|
||||
offset = targetSource.contents.data.length;
|
||||
filePath = targetSource.fullName;
|
||||
prefix = '$eol';
|
||||
suffix = '$eol';
|
||||
} on FileSystemException {
|
||||
// If we can't read the file to get the offset, then we can't
|
||||
// create a fix.
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue