XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Phil Shafer
phil at juniper.net
Thu Jul 31 21:31:24 UTC 2014
Poul-Henning Kamp writes:
>Can I point discreetely at sbuf(3)'s accumulative error handling
>and suggest that libxo does something similar ? That way applications
>only need to check for errors once, rather than after every single
>call to every single function in the libxo library.
sbuf looks like a simple case, returning either ENOMEM or the
error code from the flush function. libxo can keep a "there's
been an error" flag that the user can retrieve, but all the
details of what's gone wrong would be lost. Or it can buffer
the contents of warning messages and deliver it to the caller.
Currently you need to turn on the per-handle XOF_WARN flag to get
warnings displayed; perhaps that's enough.
Thanks,
Phil
More information about the freebsd-arch
mailing list