You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of a StateError, something that can be caught:
import'package:analyzer/dart/element/element.dart';
import'package:source_span/source_span.dart';
abstractclassUnresolvableAnnotationExceptionimplementsException {
/// Element that was annotated with something we could not resolve.Elementget annotatedElement;
/// Source span of the annotation that was not resolved.SourceSpanget annotationSource;
}
So instead of a user seeing:
Bad state: Could not resolve @null.
An import or dependency may be missing or invalid.
... we could present, for example, as a warning in AngularDart:
[WARNING] Unresolvable annotation in /some/dir/your_file.dart.
Could not resolve the "@Mispelled()" annotation on the following element:
class Foo {}
^^^
You may have an invalid or misspelled import or dependency.
/cc @natebosch@jakemac53 for sanity check. This is technically a breaking change (we would no longer throw StateError). I could have this implement/extend StateError, though I guess in practice we tell users not to catch errors?
The text was updated successfully, but these errors were encountered:
Instead of a
StateError,
something that can be caught:So instead of a user seeing:
... we could present, for example, as a warning in AngularDart:
/cc @natebosch @jakemac53 for sanity check. This is technically a breaking change (we would no longer throw
StateError
). I could have this implement/extendStateError
, though I guess in practice we tell users not to catch errors?The text was updated successfully, but these errors were encountered: