How to get Errors that occurred

I am not sure how to use the Error object. 

In the documentation it says "the error object is intended to pass
information about errors ... back to the application". Ok. But then
the documentation goes on to talk about HTError_add, which as far   
as I can tell is something for the application to tell the library
about errors, which doesn't make much sense to me since I'm interested
in the library telling ME about errors. Obviously I'm not understanding
something here.

Does "registering an error" (as used in the documentation) mean telling
the Library what errors I'm interested in?

Or is the idea that I provide callbacks for errors and then update
the error object myself as errors occur?

To err is human...