freetype
[Top][All Lists]
Advanced

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

Re: [ft] FT_Done_Face Should Not Return An Error


From: Lawrence D'Oliveiro
Subject: Re: [ft] FT_Done_Face Should Not Return An Error
Date: Sun, 6 May 2018 11:19:39 +1200

On Sun, 6 May 2018 00:11:12 +0200, Gregor Mückl wrote:

> Just don't assume that you know better than the creator of the host 
> program when it is okay to bail and how to do so.

As the provider of the lower-level abstraction, you guarantee certain
invariants. In this case, that every FT_Face has a driver, and the
driver has knowledge of that FT_Face as long as it exists.

If that invariant breaks, there’s nothing that the caller can
reasonably do about it, because it’s none of the caller’s business.

That’s what “abstraction” means.

> This is highly dependent on the actual purpose of the program ...

In that case, perhaps you could show us an example or two of how you
deal with error returns from FT_Done_Face?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]