safeMatcher function
Wraps an annotation matcher
so that an error is not thrown.
Implementation
AnnotationMatcher safeMatcher(
AnnotationMatcher matcher,
) =>
(annotation) {
try {
return matcher(annotation);
} on ArgumentError catch (e) {
logWarning('Could not resolve $annotation: $e');
return false;
}
};