Provide a message for InconsistentAnalysisException.

R=brianwilkerson@google.com

Change-Id: I1498c70c1c9d7cd43760ca2c620a3fb819a0c823
Reviewed-on: https://dart-review.googlesource.com/47903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2018-03-22 17:54:59 +00:00 committed by commit-bot@chromium.org
parent b6944e3165
commit c90ca298ed
3 changed files with 4 additions and 10 deletions

View file

@ -105,10 +105,7 @@ abstract class AnalysisSession {
* might be inconsistent with any previously returned results.
*/
class InconsistentAnalysisException extends AnalysisException {
/**
* Initialize a newly created exception to have the given [message] and
* [cause].
*/
InconsistentAnalysisException([String message, CaughtException cause])
: super(message, cause);
InconsistentAnalysisException()
: super('Requested result might be inconsistent with previously '
'returned results');
}

View file

@ -27,7 +27,7 @@ class AnalysisException implements Exception {
String toString() {
StringBuffer buffer = new StringBuffer();
buffer.write("AnalysisException: ");
buffer.write('$runtimeType: ');
buffer.writeln(message);
if (cause != null) {
buffer.write('Caused by ');

View file

@ -150,9 +150,6 @@ class AnalysisSessionImpl implements AnalysisSession {
*/
void _fillUriToLibraryCache(LibraryElement library) {
Source source = library.source;
if (source == null) {
print('zzzzz');
}
String uri = source.uri.toString();
if (_uriToLibraryCache[uri] == null) {
_uriToLibraryCache[uri] = library;