Warn on ineligibility instead of throwing

I've got two conditions in my BuildEligibility for a method override aspect: If the target type is a record the method must be explcitly declared on the type, and the type's name must end with "Store". Unfortunately, when looking at the build logs, this means I've got several dozen errors as it's throwing an exception for any conditions that fails eligibility. I'd rather it not throw an error, but rather simply notate that it's skipped the application with a warning. Is this possible? Can I still get the benefits of build eligibility without it breaking the build due to all the errors thrown? Thanks!
3 Replies
Whit
WhitOP16mo ago
So far I've just shifted all the logic out to the Fabric, but I'd like to keep it in the aspects themselves as they're the "foremost expert" authorities of what they should be applied to or not
Petr Onderka
Petr Onderka16mo ago
You can keep the logic in the aspect, if you move it to BuildAspect and produce a diagnostic warning instead of failing eligibility.
Whit
WhitOP16mo ago
Thank you!
Want results from more Discord servers?
Add your server