Re: [PATCH 1/3] local-metadata: added a new local source




On Thu, 27 Jan 2011 12:57:37 +0100, Guillaume Emont <gemont igalia com> wrote:
On 27/01/2011 09:05, Iago Toral wrote:

Shouldn't we emit an error here? client is using the API with invalid
URI or invalid key...


Same here, we should emit an error.
Not sure where we should draw the line between "no result" and "error". But this would be worth defining clearly, ideally in the documentation
of MetadataSource. For now, Juan seems to say other plugins behave in
the same way, so I'd be tempted to leave it like this.

I don't think we can draw that line clearly enough, there will always be different situations and we cannot know all the reasons a plugin may fail for. But I can tell about this one at least. In any case, I think the rule should be that we always raise an error unless there is a good reason not to.

And as for what Juan says, it is only true for the plugins *he* implemented. Check grl-metadata-store for an example of the opposite thing ;). Also, if this is wrong, the fact that other plugins do that is no reason to justify it, it would be a reason to fix this and the other plugins, which is what I think we should do here :)

Iago


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]