Report null error as a NoSuchMethodError

Change-Id: I04f978b99c75d0bba5128c07cdc56d9020529a5f
Reviewed-on: https://dart-review.googlesource.com/c/79085
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Sigmund Cherem 2018-10-10 20:07:44 +00:00 committed by commit-bot@chromium.org
parent 2da0b9f4f1
commit 9a6f811466

View file

@ -2007,8 +2007,8 @@ class NullError extends Error implements NoSuchMethodError {
: _method = match == null ? null : JS('', '#.method', match);
String toString() {
if (_method == null) return 'NullError: $_message';
return "NullError: method not found: '$_method' on null";
if (_method == null) return 'NoSuchMethodError: $_message';
return "NoSuchMethodError: method not found: '$_method' on null";
}
}