Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] How to distinguish between a fresh and cached "artifact not found"?

Andreas Sewe wrote:

Now, the use case for the above is error reporting. Currently, we log a
warning message to the Eclipse Error Log whenever model resolution
fails. If it fails because there really was not model for library X,
that warning is warranted. However, when I just attempted to resolve
five minutes ago, got a negative response, cached it
(setNotFoundCachingEnabled), and am now trying to resolve again, I
wouldn't want another warning to show up in the Error Log (at most, this
warrants a debug-level message).

I see, makes sense.

Thus, I want to be able to distinguish between the two cases.

Unfortunately, checking the exception message itself is the only easy way right now to make this distinction. The exception messages aren't localized, so while not beauty, this approach should work reliably.


Benjamin


Back to the top