Date: Thu, 31 Jul 2014 17:30:15 -0400 From: Phil Shafer <phil@juniper.net> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: sjg@freebsd.org, arch@freebsd.org, John-Mark Gurney <jmg@funkthat.com>, marcel@freebsd.org Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML Message-ID: <201407312130.s6VLUFSP097778@idle.juniper.net> In-Reply-To: <58087.1406837257@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407312130.s6VLUFSP097778>