File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ class Prefix extends ModelElement with HasNoPage {
3636 .firstWhere ((i) => i.prefix2? .element == element);
3737 var importedLibrary = libraryImport.importedLibrary2;
3838 if (importedLibrary == null ) {
39- throw StateError (
40- 'Unexpected null LibraryElement2 for imported library at '
41- '${libraryImport .uri }' );
39+ var message = 'Unexpected null LibraryElement2 for imported library at '
40+ '${library .element .firstFragment .source .uri }, at offset '
41+ '${libraryImport .importKeywordOffset }' ;
42+ var directiveUri = libraryImport.uri;
43+ if (directiveUri is DirectiveUriWithRelativeUriString ) {
44+ message += 'for import URI: "${directiveUri .relativeUriString }"' ;
45+ }
46+ throw StateError (message);
4247 }
4348 return importedLibrary;
4449 }
You can’t perform that action at this time.
0 commit comments